bi7prk
1389
2
Laravel

[HELP] About Mysql 8.0 problem

Posted 1 year ago by bi7prk

Error: PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1231 Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER'") E:\WebRoot\siteroot\laravel\vendor\laravel\framework\src\Illuminate\Database\Connectors\MySqlConnector.php:150

MySql : sql-mode='STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION'

mysql.log: 2018-04-26T07:10:34.960374Z 8 Connect [email protected] on lavavel using TCP/IP 2018-04-26T07:10:34.961057Z 8 Query use lavavel 2018-04-26T07:10:34.962085Z 8 Prepare set session sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' 2018-04-26T07:10:34.963545Z 8 Execute set session sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' 2018-04-26T07:10:34.963856Z 8 Close stmt

modify ./config/database.php :

'mysql' => [ ...... 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'sql_mode' => 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION', .... ]

The problem is still there.

Please sign in or create an account to participate in this conversation.