How to fix the error when you run the migrations php artisan migrate?

Want to start the migration. Run the command php artisan migrate
Next error:

[Illuminate\Database\QueryException]
could not find driver (SQL: select * from information_schema.tables where table_schema = homestead and table_name = migrations)

[PDOException]
could not find driver


I don't know how to fix it, I'll be glad to help!
June 27th 19 at 15:13
1 answer
June 27th 19 at 15:15
Solution
could not find driver
anything you don't know? Perhaps forgotten in PHP need a driver for the database to add?
How can I do it? - Korey_Schumm commented on June 27th 19 at 15:18
: If you use MySQL, check that in php.ini have nezakomentirovannaja line extension=php_pdo_mysql.dll - Odell commented on June 27th 19 at 15:21
Further, the error became this:

[Illuminate\Database\QueryException]
SQLSTATE[HY000] [2002] ����������� �� �����������, �.�. �������� ��������� ������ ������ �� �����������.
(SQL: select * from information_schema.tables where table_schema = homestead and table_name = migrations)

[PDOException]
SQLSTATE[HY000] [2002] ����������� �� �����������, �.�. �������� ��������� ������ ������ �� �����������.


� is just an empty rectangle in the console - Korey_Schumm commented on June 27th 19 at 15:24
: Gibberish I don't understand, but 2002 means can't connect.

MySQL is installed and running?
Username/Password in the settings file (.env) correct?
The database was created? - Odell commented on June 27th 19 at 15:27
: I use homestead there definitely have mysql running, database connected, all works.
file .env need to check, tell me where to find it, please - Korey_Schumm commented on June 27th 19 at 15:30
: Homestead for it seems to be configured OK (he do not use it, could be wrong). .env file located in the root directory of the project. Perhaps you have it hidden because of the point in front of the name. Linux IDE and some hide those files. - Odell commented on June 27th 19 at 15:33
you were right, it's in the file .env
fixed bug, thank you - Korey_Schumm commented on June 27th 19 at 15:36

Find more questions by tags Laravel