Error Messages:
laravel which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Solution:
To turn off strict mode.
Modify the MySQL parameter in the app/database.php file with the following changes.
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'strict' => false, //Important
'engine' => null,
],
Similar Posts:
- Laravel Syntax error or access violation: 1055 ‘***’ isn’t in GROUP BY
- When laravel is uploaded to the server, whoops, looks like something went wrong appears
- MySQL database insert into statement with parameters Error
- [Warning] Using a password on the command line interface can be insecure. (Solved)
- Laravel [1045] Solution Access denied for user’homestead’@’localhost’
- [Solved] ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’
- [Solved] Access denied for user ‘Administrator’@’localhost’ (using password: YES)
- Laravel uses group by to report errors [How to Solve]
- Solve the problem of unknown column ‘password’ in ‘field list’ in MySQL
- [How to Solve] nodejs mysql ER_NOT_SUPPORTED_AUTH_MODE