[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause...
1126 ワード
問題の説明:
mysqlクライアントでdelete削除文を実行すると、次のエラーが表示されます.
5.7.18
1.findコマンドを使用してmyという名前を検索します.cnfのファイル
仕事を片付ける
mysqlクライアントでdelete削除文を実行すると、次のエラーが表示されます.
[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and
contains nonaggregated column 'information_schema.PROFILING.SEQ'
which is not functionally dependent on columns in GROUP BY clause;
this is incompatible with sql_mode=only_full_group_by
クエリーMySQLバージョンは次のとおりです.5.7.18
select version() from dual;
検索後、次のソリューションが得られます.1.findコマンドを使用してmyという名前を検索します.cnfのファイル
# find / -name my.cnf
2. viコマンドを使用してファイルを編集し、次の文を追加します.sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
の最終部分コードは次のとおりです.character-set-server=utf8mb4
lower_case_table_names=1
skip-host-cache
skip-name-resolve
sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
[client]
default-character-set=utf8mb4
3. 保存後mysqlサービスを再起動# service mysqld restart
仕事を片付ける