Reason: myql8 enable only_FULL_GROUP_BY
1. Select @global.sql_mode A value indicates that group by mode is enabled
2. Turn off this mode:
Add a line of instructions under [mysqld] in my.cnf configuration file
[mysqld]
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_ BY_ZERO,NO_ENGINE_SUBSTITUTION
3. Restart MySQL service
Similar Posts:
- [Solved] MYSQL Command gruop by Error: this is incompatible with sql_mode=only_full_group_by
- SELECT list is not in GROUP BY clause and contains nonaggregated
- [Solved] SELECT list is not in GROUP BY clause and contains nonaggregated
- Solve the problem of grouping error expression #1 of select list is not in group for MySQL greater than version 5.7
- Expression #1 of ORDER BY clause is not in SELECT list, references column ‘xxxx’ which is not in SELECT list; this is incompatible with DISTINCT
- MYSQL Insert: SQLSTATE[HY000]: General error: 1364 Field ‘xxxxx’ doesn’t have a default value
- MySQL Error: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column
- [Solved] MySQL Error: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre
- SELECT list is not in GROUP BY clause and contains nonaggregated column
- Laravel uses group by to report errors [How to Solve]