1:mysql5.7需要sql_mode的值为:STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
2:修改config/databases.php中mysql的strict
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', ''),
'port' => env('DB_PORT', ''),
'database' => env('DB_DATABASE', ''),
'username' => env('DB_USERNAME', ''),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => env('DB_PREFIX','user_'),
'strict' => false,
'engine' => null,
],
转载于:https://my.oschina.net/u/162418/blog/2050448
发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/101432.html原文链接:https://javaforall.cn
【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛
【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...