TransWikia.com

I broke MySQL and can't figure out what's wrong

Ask Ubuntu Asked by Abdul-Hakeem on January 6, 2022

Ubuntu Server 20.04

Somehow in the course of trying to install phpmyadmin, I broke MySQL and I can’t figure out how to fix it.

I originally installed the LAMP stack via tasksel. In the course of trying to install a wordpress site, I was trying to get phpmyadmin installed and I’m not sure what happened but now MySQL is broken. I’m sure I did something wrong somewhere I’m just not sure where.

I’ve already done sudo apt purge on phpmyadmin and mysql-server, as well as autoremove and autoclean after every uninstall. I also tried mariadb-server but this same exact problem happens whether I use mysql or mariadb.

I’ve also tried deleting /etc/mysql and /var/lib/mysql in the course of troubleshooting

At this point, mariadb-server, mysql-server, and phpmyadmin are all purged and autocleaned/autoremoved. I’m going to attempt installing mariadb-server again and I will record my results:

Installation Output

So it seems like for some reason, dpkg is failing to properly configure the mariadb-common package after installation. I tried googling what "dpkg exit status 2" means, but couldn’t find anything helpful

Wasn’t sure if I already had gdebi installed, but this post suggested installing it, so when I tried to install it, this happens:

Installing GDebi

So now it looks like this is going to effect all package installations going forward unless I purge mariadb or fix the problem.

If I try sudo dpkg --configure -a I get this:

sudo dpkg --configure -a

And if I try sudo apt --fix-broken install:

sudo apt --fix-broken install

As far as I can tell, for some reason dpkg is not completeting the configuration process after the package installation, and it’s breaking everything. But it’s only happening for mysql-server/mariadb-server, not for any other packages. I’m tempted to just nuke the server and reinstall Ubuntu but I’d really like to avoid that if possible.

I’ve also tried removing the mysql-server/mariadb-server packages with Synaptic instead of apt/dpkg, but it makes no difference, same problem happens upon reinstallation.

Does anyone know how to fix this without doing a whole server reinstallation? Thanks in advance

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP