[Err] 1055

来源:互联网 发布:js span disabled 编辑:程序博客网 时间:2024/05/22 01:51

问题描述:

在mysql客户端执行delete删除语句时,报出了以下错误:

[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
查询MySQL版本为:5.7.18

select version() from dual;
经过搜索后,得到以下解决方案:

1. 使用find命令查找名为my.cnf的文件

# find / -name my.cnf
2. 使用vi命令编辑该文件,增加以下语句:

sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
最终部分代码如下所示:

character-set-server=utf8mb4lower_case_table_names=1skip-host-cacheskip-name-resolvesql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'[client]default-character-set=utf8mb4
3. 保存后, 重启mysql服务

# service mysqld restart


解决收工.
原创粉丝点击