[err] 1055

Posted Mr_邓

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[err] 1055相关的知识,希望对你有一定的参考价值。

本人mysql安装在ubuntu16.04上,mysql版本是5.7.19;在创建表和插入数据时报了

[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

 在网上查到的解决方案是修改/etc/mysql/my.cnf文件,在其中添加如下内容,然后重启mysql(重启命令:service mysql restart)

[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配置引用了/etc/mysql/conf.d文件夹以及/etc/mysql/mysql.conf.d文件夹,且配置都放在了mysql.conf.d文件夹下的mysqld.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。

完美解决。。。。

以上是关于[err] 1055的主要内容,如果未能解决你的问题,请参考以下文章

mysql 5.7.9 [Err] 1055 插入时候会报错

mysql 5.7.9 [Err] 1055 插入时候会报错

mysql报错err1055

MySQL-[Err] 1055 - Expression #1

[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 的问题 MySQL