close

[Solved] Artisan migrate could not find driver

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error Artisan migrate could not find driver in php. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Artisan migrate could not find driver Error Occurs?

Today I get the following error Artisan migrate could not find driver in php.

How To Solve Artisan migrate could not find driver Error ?

  1. How To Solve Artisan migrate could not find driver Error ?

    To Solve Artisan migrate could not find driver Error If you are on linux systems please try running sudo php artisan migrate As for me,sometimes database operations need to run with sudo in laravel.

  2. To Solve Artisan migrate could not find driver Error

    To Solve Artisan migrate could not find driver Error If you are on linux systems please try running sudo php artisan migrate As for me,sometimes database operations need to run with sudo in laravel.

Solution 1

In your php.ini configuration file simply uncomment the extension:

;extension=php_pdo_mysql.dll

(You can find your php.ini file in the php folder where your stack server is installed.)

If you’re on Windows make it: extension=php_pdo_mysql.dll

If you’re on Linux make it: extension=pdo_mysql.so

And do a quick server restart.

If this isn’t working for you, you may need to install pdo_mysql extension into your php library.

Solution 2

If you are on linux systems please try running sudo php artisan migrate As for me,sometimes database operations need to run with sudo in laravel.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read

Leave a Comment