Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


After a recent 12.04 update (MySQL was updated), when trying to access my localhost site I get the following error:

Database Error: Unable to connect to the Database: The MySQL adapter 'mysql' is not available.

However, from a terminal window I can see MySQL running as a service and I can access and use MySQL from there.

Any ideas on what happened ?? Is this a config change I need to do in Apache ??

Thanks in advance ! grpace

share|improve this question
I ran into a similar issue, what happens when you try to log in with the commandline client? mysql -u <username> -P – madmaze Dec 23 '12 at 22:43

If you use PHP5, I think you have to install "php5-mysql" :

sudo apt-get install php5-mysql
share|improve this answer
Thank you, madmaze for your reply. Logging in at the command line was working last week, but now gives me the error: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). using the locate command I find mysqld.sock in my home directory. – Gregory R. Pace Dec 25 '12 at 15:00
To Benabra: php5-mysql is already installed. When trying to access localhost/phpmyadmin I get: The mysqli extension is missing. Please check your PHP configuration. Everything was working fine until MySQL was updated through Ubuntu's Update Manager. I find it really irritating that an update will break things that were previously working. Any other ideas will be greatly appreciated. Thank You grpace – Gregory R. Pace Dec 25 '12 at 15:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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