Home > Backend Development > PHP Tutorial > Laravel 5 Migration Error: How to Fix the \'Could Not Find Driver\' Issue?

Laravel 5 Migration Error: How to Fix the \'Could Not Find Driver\' Issue?

Susan Sarandon
Release: 2024-11-26 17:20:14
Original
288 people have browsed it

Laravel 5 Migration Error: How to Fix the

Laravel 5 PDOException: Could Not Find Driver

Running the "php artisan migrate" command in Laravel 5 throws a "could not find driver" error. This issue persists even when the application is running, resulting in database connection problems.

Solution:

The issue arises due to missing MariaDB or MySQL database extension in your PHP environment. To resolve this, run the following command in your terminal:

sudo apt-get install php7.0-mysql
Copy after login

This command will install the necessary PHP extension for MySQL connectivity. Restart your application or server after the installation is complete to apply the changes.

The above is the detailed content of Laravel 5 Migration Error: How to Fix the \'Could Not Find Driver\' Issue?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template