Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 get this rather weird problem while I try to install Drupal 6.22. The web server is nginx+ php5-fpm which I've used with great success before and according to the Ubuntu package manager, php5-mysql is already the newest version (however it does not appear in phpinfo() page). The configuration page is in /etc/php5/fpm/php.ini. Here is the error message:

In your ./sites/default/settings.php file you have configured Drupal to use a mysql server, however your PHP installation currently does not support this database type.

I have created the database and permission.The database declaration line in settings.php seem to be correct.

How can I enable MySQL support and solve this problem?

share|improve this question

migrated from Jun 1 '11 at 22:17

This question came from our site for Drupal developers and administrators.

up vote 1 down vote accepted

" (However it does not appear in phpinfo() page)".

If it is not listed there, then it is not enabled.

Ubuntu usually creates a /etc/php5/conf.d/extension.ini file for each extension package, make sure that exists and contains a line like "".

share|improve this answer
In fact the extension.ini did not exist, so I created it in /etc/php5/fpm/conf.d and added '' to it. After restarting php5-fpm, the problem is gone. You're the man Berdir, cheers! – alfish Jun 2 '11 at 11:04
Note that I meant name_of_the_extension.ini (e.g. mysql.ini), but as long as it works... :) – Berdir Jun 2 '11 at 11:21

I believe Drupal uses MySQLi to establish the database connection. You could try installing the php5-mysqli package if MySQLi is not supported by default.

share|improve this answer
Drupal supports both extensions. – Berdir Jun 1 '11 at 23:51
E: Package 'php5-mysqli' has no installation candidate – alfish Jun 2 '11 at 10:58

I always advice new users to install phpmyadmin package. That will install, as a dependency, all the packages you need to properly run drupal. As you're running with nginx, you'll have to install it later.

Also, you can install drupal from ubuntu's repository

share|improve this answer
In my view, both are bad practices, even for newbies. phpmyadmin is the waste of memory and installing drupal from Ubuntu repos is accepting the delay to update packages to reach new releases. – alfish Jun 2 '11 at 11:09
I agree. It's not recommended at all, but if you're in a hurry and in a testing environment, I don't think it's too bad. – boris quiroz Jun 2 '11 at 23:27

Drupal's config.php file should have:

$db_url = 'mysql://db_username:db_password@localhost/database_name';


$db_url = 'mysqli://db_username:db_password@localhost/database_name';

MySQL should be already running.

php.ini should have:



share|improve this answer
I guess you are talking about Windows. I said farewell to that a long time ago :) – alfish Jun 2 '11 at 11:06
alfish, You can replace "php_mysql(i).dll" with "php_mysql(i).so" in the above and now it's about Linux. – rightstuff Jun 2 '11 at 13:46

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.