samedi 24 février 2018

laravel php artisan migrate Error (timeout)

I am using Laravel 5.6

when I use the command 'php artisan migrate' I get this error (after a minute) :

"Illuminate\Database\QueryException : SQLSTATE[HY000] [2002] Operation timed out (SQL: select * from information_schema.tables where table_schema = MYDATABASE and table_name = migrations)"

I have set up the correct database configuration in .env and config/database.php

I checked that my db connection works : if(DB::connection()->getDatabaseName()) { echo "Yes! successfully connected to the DB: " . DB::connection()->getDatabaseName(); }

And it works.

if i run the query directly in mysql, it will not work because of the lack of quotes. if instead I run this in mysql it will work:

select * from information_schema.tables where table_schema = 'MYDATABASE' and table_name = 'migrations'

the issue in php artisan seem to be : "Operation timed out" (not the usual "File not found" when i tried to look for an answer here.

How to solve the php artisan migrate issue ??? thank you!




from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2HL1sRS
via IFTTT

Aucun commentaire:

Enregistrer un commentaire