Expression #1 of SELECT list is not in GROUP by clause and contains nonaggregated column ' H5app_workreport.c.id ' C1>this is incompatible with sql_mode=only_full_group_by
Reason:
The reason for this error is the high version of MySQL (client Server version 5). 7.18) The default Sql_mode contains only_full_group_by, which guarantees that the columns that are select to appear in GROUP by.
The statements for viewing Sql_mode are as follows:
SELECT @ @GLOBAL. sql_mode;
Solution:
Method one. You can use the SQL statement to temporarily modify the Sql_mode, restart MySQL after the event:
SET @ @GLOBAL. sql_mode= ' Strict_trans_tables,no_zero_in_date,no_zero_date,error_for_division_by_zero,no_auto_ Create_user,no_engine_substitution '
Method Two: Modify the MySQL configuration file, by manually adding Sql_mode way to enforce the specified do not need only_full_group_by property, my.cnf in the ETC folder, VIM under the cursor moved to the end,
Add the following:
Sql_mode=strict_trans_tables,no_zero_in_date,no_zero_date,error_for_division_by_zero,no_auto_create_user,no_ Engine_substitution
Error: This was incompatible with sql_mode=only_full_group_by