When I installed Drupal 7 on localhost, it didn't show MySQL as database type.

pic to show error


It also shows this error.

Fatal error: Undefined class constant 'MYSQL_ATTR_USE_BUFFERED_QUERY' in D:\AppServ\www\drupal\includes\database\mysql\database.inc on line 46

2 Answers 2


Appserv includes MySql, but your post shows that only SQLite is installed

Try to reinstall Appserv with MySQL

There is more discussion on this error on drupal.org

You may need to enable PDO example:

use the phpinfo() function to know the path of php.ini: "Loaded Configuration File C:\Windows\php.ini", then modify the php.ini file to enable: "extension=php_pdo_mysql.dll" and it works!


You need the php's PDO and mysql extensions installed on your system in order for Drupal to use MySql data storage. One or both of them are apparently missing, and Drupal defaults to Sqlite, which is a simple database system and only needs a writable file to work. Please refer to Drupal's system requirements page for further info.

  • ok how can i install mysql , i install appserv Commented Jan 22, 2014 at 17:57
  • Sorry, I know nothing about AppServ. Perhaps reading this post may be of help
    – pamatt
    Commented Jan 22, 2014 at 18:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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