报错:
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
解决方案:
找到my.cnf文件,Linux上默认在etc/中,vi打开编辑器,在[mysqld]输入
sql_mode=‘STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION’
重启mysql服务即可
这篇博客主要介绍了如何处理MySQL查询时遇到的错误:1055错误,该错误提示ORDER BY子句中的列不在GROUP BY子句中,且包含非聚合列。解决方案是修改MySQL的sql_mode设置,具体步骤为找到my.cnf配置文件,添加指定的sql_mode行,并重启MySQL服务。
560

被折叠的 条评论
为什么被折叠?



