1、Err1055,出现这个问题往往是在执行sql语句时候,在最后一行会出现这个问题。
[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
解决方法:
在 /etc/my.cnf 文件里加上如下:
sql_mode='NO_ENGINE_SUBSTITUTION'
[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
解决方法:
在 /etc/my.cnf 文件里加上如下:
sql_mode='NO_ENGINE_SUBSTITUTION'
然后,重启Mysql服务就可以解决了!
然后登陆mysql:
mysql -uroot -p
用下面的指令检查一下是否修改成功:
select version(), @@sql_mode;
如果sql_mode 的值为 'NO_ENGINE_SUBSTITUTION'
表示OK,注意网上有些办法是用sql指令去修改这个值,该方法无效,因为每次重启后会复原,只有强行修改my.cnf才凑效。
转自:https://www.cnblogs.com/gaojupeng/p/5740011.html
本文介绍了解决MySQL中Err1055错误的方法,该错误通常出现在执行SQL语句时,涉及到GROUP BY和ORDER BY子句。通过修改my.cnf文件中的sql_mode设置为'NO_ENGINE_SUBSTITUTION',并重启MySQL服务即可解决问题。

1403

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



