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

I installed apache2, php, php5-mysql and mysql-server. When I type http://localhost then everything is ok. But when I type http://localhost/wordpress then this message appears:

Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

What to do to install mysql extension? I thought that I already did it installing php5-mysql.

share|improve this question
Did you install wordpress pkg? – kyleN Nov 11 '11 at 0:08
Yes I installed it. – Иван Бишевац Nov 15 '11 at 15:37
up vote 2 down vote accepted

Information provided in the official Wordpress may be useful for your issue. Some of which I found fully documented over here:

Some of the possible solutions includes but not limits to:

Thanks for the reply, I found the resolution:

1) yum install -y mysql mysql-server - Ensure that MySQL and MySQL server are installed

2) yum install -y php php-mysql - Ensure that PHP and the PHP MySQL components are installed

3) Restart Apache

The same as:

Only one thing causes that error. Your PHP.INI doesn't have the mysql line uncommented, so it's not loading the mysql module (or the module is simply missing entirely).

Restart your webserver after you fix the PHP.INI file.

There are lots of forums and official support threads that refers to that last one as a final solution. But I also suggest you to install a MySQL Administration tool (or workbench, whatever you prefer) in order to make sure your MySQL installation is properly working. Some suggestions can be found in the answers provided right here: Are there any GUIs for Mysql? What is recommended?

First try the trick of the Wordpress Forums, if that does not work I suggest you to check if everything is ok on your MySQL installation and as an additional suggestion, you can find more useful and precise support on the Wordpress Forums just in case that the problem remains after checking that everything is ok in your server.

Good luck!

share|improve this answer
It's good answer except that yum doesn't work in Ubuntu :) My problem disappeared after installing php5-mysql and restarting system. – Иван Бишевац Nov 15 '11 at 15:38
Based on what I get in my terminal, yum can be easily installed by dropping the sudo apt-get install yum whic btw I don't use but I mentioned based on the experiences of other users in the Official Wordpress forums. Additional information on the yum package manager can be reached right here: Thank you for the update on your solved issue. :) – Geppettvs D'Constanzo Nov 15 '11 at 17:33

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.