2

I recently upgraded to PHP7, now I learned to find out out while connecting to Laravel, with this problem [PDOException] could not find driver.How am I going to configure or install it? Thank you very much.

inspectoroaks
  • 23
  • 1
  • 1
  • 5

2 Answers2

6

Here is a solution:

sudo apt-get install php7.0-mysql
sudo phpenmod pdo_mysql
sudo service apache2 restart
Floern
  • 33,559
  • 24
  • 104
  • 119
1

Following steps are working for me

Installing php7.0-mysql

sudo apt-get install php7.0-mysql

You will then need to ensure the module is enabled:

sudo phpenmod pdo_mysql

Then restart Apache to load the new modules:

sudo service apache2 restart
Nikunj K.
  • 8,779
  • 4
  • 43
  • 53