当前位置:Gxlcms > 数据库问题 > Mysql 5.7版本报错 1055

Mysql 5.7版本报错 1055

时间:2021-07-01 10:21:17 帮助过:14人阅读

[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

 

 解决方法:

对于错误err1055查询了很久,说是5.7版本开始对sql的分组查询有了一个语法的检测,对于之前的sql就会出现一些错误,只要吧sqlmodel中的only_full_group_by去掉就行了。

#查询sqlmodel模式:select @@global.sql_mode

设置sqlmodel 模式:SET GLOBAL  sql_mode = ‘STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION‘

Mysql 5.7版本报错 1055

标签:bst   create   ble   5.7   family   tab   date   visio   查询   

人气教程排行