美文网首页
mysql--1055报错

mysql--1055报错

作者: w_dll | 来源:发表于2020-03-10 20:21 被阅读0次

执行sql语句时出现报错:

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

参考链接:
https://stackoverflow.com/questions/34999289/mysql-error-1055-information-schema-profiling-seq-on-every-query
只是由于从MySQL 5.7.5开始,默认的SQL模式包括ONLY_FULL_GROUP_BY。
执行以下更新sqlmode:

SET GLOBAL  sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

重新退出登陆后发现更改成功,这个时候执行不会报错了



相关文章

网友评论

      本文标题:mysql--1055报错

      本文链接:https://www.haomeiwen.com/subject/sqggdhtx.html