I was using MySQL without any error on Ubuntu 15.04.But yesterday I upgraded to 16.04LTS from 15.04 yesterday(15.04 to 15.10 and 15.10 to 16.04LTS). I'm having some issues now

When I check MySQL status using

mysqladmin -u root -p status

I'm getting this error

 mysqladmin: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)
 mysqladmin: [ERROR] Fatal error in defaults handling. Program aborted!

So I tried remove it using

sudo apt-get remove --purge mysql-server mysql-client mysql-common

And I'm getting this error

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 dbconfig-mysql : Depends: mysql-client but it is not going to be installed or
                       mariadb-client but it is not going to be installed or
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

As I'm a new to Ubuntu can anyone help me with the situation ? Thanks in advance


For me this looks like a dependency issue, so you can try this:

apt-get autoremove
apt-get remove --purge mysql*
apt-get autoclean
deluser mysql
rm -rf /var/log/mysql
rm -rf /var/lib/mysql
rm -rf /etc/mysql

Hope this helps!

| improve this answer | |

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.