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
  • 5

2 Answers2

5

Here is a solution:

sudo apt-get install php7.0-mysql
sudo phpenmod pdo_mysql
sudo service apache2 restart
Floern
  • 32,709
  • 24
  • 103
  • 117
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,121
  • 4
  • 40
  • 49