mysql5.6升級5.7注意事項
阿新 • • 發佈:2020-12-25
修改資料庫的最大group_concat連線長度:
SET GLOBAL group_concat_max_len = 102400;
SET SESSION group_concat_max_len = 102400;
#要徹底修改,在MySQL配置檔案(my.ini)中加上
group_concat_max_len = -1 # -1為最大值或填入你要的最大長度
#並重啟mysql
#在客戶端執行語句:
#show variables like "group_concat_max_len";
建立表報錯:
[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
命令列執行
select version(), @@sql_mode;
SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));