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

MySQL設置時區時報錯:sql

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

致使時區沒法修改爲功;spa

解決方法:code

  • -- 查看sql_mode設置 io

  • show variables like "sql_mode"; 方法

  • -- 設置sql_mode co

  • set sql_mode=''; ab

  • set sql_mode='NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES'; 時區

再從新執行修改時區sql便可成功修改; 

相關文章
相關標籤/搜索