PHP 7 RC3: How to install missing MySQL PDO PHP 7 RC3: How to install missing MySQL PDO mysql mysql

PHP 7 RC3: How to install missing MySQL PDO


For thoses running Linux with apache2 you need to install php-mysql

apt-get install php-mysql

or if you are running ubuntu 16.04 or higher just running the following command will be enought, no need to edit your php.ini file

apt-get install php7.2-mysql

If you are running ubuntu 15.10 or below:

Edit your php.ini file, it's located at /etc/php/[version]/apache2/php.ini and search for pdo_mysqlyou might found something like this

;extension=pdo_mysql.so

Change it to this

extension=pdo_mysql.so

Save the file and restart apache

service apache2 restart

Check that it's available in your phpinfo()


First install php-mysql

sudo apt-get install php7.0-mysql//change the version number based on the php version

then enable the module

sudo phpenmod pdo_mysql

and restart apache

sudo service apache2 restart 


First, check if your php.ini has the extension enabled "php_pdo_mysql" and "php_mysqli" and the path of "extension_dir" is correct. If you need one of above configuration, then, you must restart the php-fpm to apply the changes.

In my case (where i am using the Windows OS in the company, i really prefer OSX or Linux), i solved the problem putting this values in the php.ini:

; ...extension_dir = "ext"; ... extension=php_mysqli.dllextension=php_pdo_mysql.dll; ...

I hope this helps.