Mysqldump错误:ONLY_FULL_GROUP_BY

时间:2017-03-14 17:28:19

标签: mysql

我使用mysqldump并获取错误。 在我的配置文件writed属性sql_mode和mysql控制台全局和会话属性相似。

[mysqld]
sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

错误:

mysqldump -uroot -p  --compatible=ansi --skip-extended-insert --compact Terminal > dump.sql

mysqldump: Error: 'Expression #6 of SELECT list is not in GROUP BY 
clause and contains nonaggregated column 'information_schema.FILES.EXTRA' 
which is not functionally dependent on columns in GROUP BY clause; this is
incompatible with sql_mode=only_full_group_by' when trying to dump tablespaces

如果我在my.cnf中使用此属性[mysqldump],我会收到错误...

mysqldump: [ERROR] unknown variable 'sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'

我该如何解决?

1 个答案:

答案 0 :(得分:1)

我在mysqldump中遇到此错误,参数为 mysqldump --compatible = ansi ...

没有这个参数。