1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contai
Posted skyxia
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contai相关的知识,希望对你有一定的参考价值。
之前一直使用的mysql5,突然换成8之后,有许多地方不一样,今天就碰到一个。
在使用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 |
网上找了下处理的方法,大体有两种:一种是直接改配置文件(永久性的),另一种是使用sql语句来设置(临时性)
修改配置文件:在配置文件里加一句就可以了:sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
以上语句不要写错哦,错了服务启动不了,我就是因为写错搞了好久
windows的在安装目录里找到my.ini,添加进去后,关掉mysql服务重启
关:net stop mysql
启:net start mysql
(注意:mysql是你服务的名称)
centos7在/etc/my.cnf中添加,重启
service mysqld restart或者 systemctl restart mysqld
在window和centos7上,我都设置了,之后就不会报错 ^_^
我在创建表时,报了这个错,但还是创建成功了,不晓得是为甚 ?
以上是关于1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contai的主要内容,如果未能解决你的问题,请参考以下文章
[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause 的问题 MySQL
1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contai
解决[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause 的问题 MySQL
[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated
MYSQL报错:1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated col
mysql错误:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggr