执行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',''));
重新退出登陆后发现更改成功,这个时候执行不会报错了
网友评论