[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。

完美解决。。。。

时间: 2024-09-28 20:01:53

[err] 1055的相关文章

[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 column 'information_schema.PROFILING.SEQ' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only

解决[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 column 'information_schema.PROFILING.SEQ' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only

MySQL [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause

方案1: 修改sql_mode的值 set sql_mode = '';set sql_mode = 'NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES'; 再次执行刚才的语句,就不会报错了. 方案2: 在my.cnf添加如下: [mysqld] sql_mode='NO_AUTO_VALUE_ON_ZERO,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO

Mysql 5.7版本报错 1055

错误提示: [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=o

mysql5.7 1055

错误提示: [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=o

MySQL5.7.25报1055错误解决方案

基本信息: 系统一:CentOS7.5 + mysql5.7.25 系统二:win10 + mysql5.7.25解压缩版 数据库表结构如下: 对MySql进行操作时报以下错误: [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 functi

windows server 2008 安装MySQL 8.0 遇到报错 1055 - Expression #1 of ORDER BY clause is not in GROUP BY

mysql安装参考教程:https://blog.csdn.net/qq_37350706/article/details/81707862 安装完毕后 执行sql语句 SELECT * FROM court_info GROUP BY second_court_name HAVING COUNT(second_court_name) > 1 报错 [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause an

MYSQL5.7版本sql_mode=only_full_group_by问题

具体出错提示: [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

MySQL 语句练习

---恢复内容开始--- 在cmd中备份:数据表结构+数据 mysqldump -u root db1 > d:\test\test.sql -p 数据表结构 mysqldump -u root -d db1 > d:\test\test.sql -p 再cmd中将备份的执行文件写入数据库 创建表:  create database test default charset utf8 collate utf8_general_ci 写入:mysql -u root test < d:\t