0
votes

I have a problem with artisan and the migrations.

I just created a new project, copy-paste my database using Laravel Schema Design, put the schemaLenght into my config/database.php file. Then I made the php artisan migrate and I got this error:

SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = table_atelier and table_name = migrations).

So, I would like to know, what is the problem?

I think, maybe it's the new version of MAMP, I upgrad it. Or, maybe, the php version (I have the 7.1.12 or the 7.2.1).

2

2 Answers

0
votes

Something is wrong with your credentials. Did you use the right credentials in your .env?

0
votes

That because NO_AUTO_CREATE_USER (sql-mode) has removed in mysql 8, https://dev.mysql.com/doc/refman/8.0/en/mysql-nutshell.html#mysql-nutshell-removals

The file has modified by creator of Laravel formmating commit

return "set session sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'";