1. 程式人生 > >[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated

[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated

[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

主要是因為sql_mode設定導致的這個錯誤,設定錯誤有很多可能下面會有一下我解決這個錯誤檢視的文章,本篇主要寫我自己的解決辦法。

-- 檢視sql_mode設定


show variables like "sql_mode";
-- 設定sql_mode
set sql_mode=''; 
set sql_mode='NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES';


問題成功解決!

也可以可以手動修改MySql本地配置檔案: