Laravel 5 PDOException Could Not Find Driver: Troubleshooting and Resolution
Problem:
When attempting to run "php artisan migrate" in Laravel 5, you encounter the following error:
[PDOException] could not find driver
Subsequently, database connections fail with a "could not find driver" error in Connector.php line 55.
Solution:
The solution involves installing the missing PHP driver for MySQL. In this specific case, the issue was resolved by executing the following command:
sudo apt-get install php7.0-mysql
This command installs the necessary PHP extension for interacting with MySQL databases, resolving the "could not find driver" error.
The above is the detailed content of Laravel 5 \'Could Not Find Driver\' Error: How to Fix PDOException?. For more information, please follow other related articles on the PHP Chinese website!