Laravel 5 PDOException Could Not Find Driver
I'm using Ubuntu 16.04 and PHP 5.6.20
After too many problems, the below steps solved this for me:
find
php.ini
path viaphpinfo()
uncomment
extension=php_pdo_mysql.dll
add this line
extension=pdo_mysql.so
then run
sudo apt-get install php-mysql
You should install PDO on your server.
Edit your php.ini (look at your phpinfo()
, "Loaded Configuration File" line, to find the php.ini file path).
Find and uncomment the following line (remove the ;
character):
;extension=pdo_mysql.so
Then, restart your Apache server. For more information, please read the documentation.
Same thing happend to me after upgrading distro.
Running sudo apt-get install php7.0-mysql
fixed it for me.