I know there are many questions regarding mysql not starting. I've tried following things

Checking MySQL error log — error reading '/var/log/mysql': Is a directory

Check /var/log/dist-upgrade/apt.log file for broken packages again no such file or directory

Remove MySQL-server and reinstall it But it's not getting uninstalled at all

this problem occurred when I uninstalled "plasma-desktop". I used following commands to remove "plasma-desktop" and related packages.

sudo apt-get purge '^kde' '^kubuntu' '^plasma'

sudo apt-get remove plasma-desktop

sudo apt-get autoremove

There was no error produced by the above three commands.


First get into super user mode by using command sudo -i then use following commands

apt-get purge mysql\*
rm -rf /var/lib/mysql
rm -rf /etc/mysql
dpkg -l | grep -i mysql
apt-get clean
apt-get aut
apt-get remove --purge mysql-server mysql-common

Now reinstall MYSQL

apt-get -f install -o Dpkg::Options::="--force-overwrite" mysql-server
  • 2
    @Dan: Regular work shouldn't be done as root, yes. But if you're going to do some sysadmin tasks and know you'll have to type a bunch of commands, all of them as root, prefixing each of them with sudo gains you exactly nothing; the chance of a typo is just as big. The only advantage of sudo in this case is when you've set it up to log every action and want to be able to use that log to retrace potential mistakes. – Guntram Blohm Sep 22 '18 at 10:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.