mysql-warning:[Err] 1055 - Expression #1 of ORDER BY

服务器上使用yum安装MySQL5.7社区版后总是提示一条warning信息
在Navicat客户端上————>:

SELECT VERSION();
5.7.23-log

SHOW WARNINGS;
[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

SHOW VARIABLES LIKE 'sql_mode%'
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
#确实是有ONLY_FULL_GROUP_BY这个sql语言模式,去配置文件中删除这个变量配置

vim /etc/my.cnf
[mysqld]
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后warning信息消失

 

你可能感兴趣的:(坑王驾到)