mysql 5.7.23 [Err] 1055

执行SQL建表,报出如下错误,但是表仍然建立成功。查找资料原因说明是sql-mode校验问题。

[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

解决方案:需要在配置文件中修改。

Linux:/etc/my.cnf (原文链接:http://blog.csdn.net/newb921/article/details/5178011)

windows:my.ini

修改sql_mode属性,如果没有该属性,添加一下就好,去掉only_full_group_by。

 

然后重启数据库。SHOW VARIABLES LIKE '%sql_mode%';  查看下SQL的模式看看是否生效。

 

你可能感兴趣的:(学习笔记)