Search code examples
mysqllaravellaravel-5

Laravel 5.5 with MySQL 8.0.11: 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER'


I've just installed MySQL 8.0.11, transferred my app's database into it, and changed the Laravel database settings to use the new one. Now every time I try to log in I get the following error:

ERROR 1231 (42000):
Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER'

I tried to set NO_AUTO_CREATE_USER manually:

set global sql_mode="..., NO_AUTO_CREATE_USER, ...";

But I get the same error. How could I solve the problem and run Laravel 5.5 with MySQL 8.0.11?


Solution

  • The next release of Laravel 5.5 will add support for MySQL 8.0: https://github.com/laravel/framework/pull/24038

    UPDATE: Laravel 5.5.41 has been released.