ERROR 1055 (42000): Expression #1 of ORDER BY clause is not in GROUP BY..sql_mode=only_full_group_by
2017-10-19 19:02
691 查看
MySQL错误:Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'DB.table.column' which is not functionally dependent on columns in GROUP BY clause; this is incompatible
with sql_mode=only_full_group_by
解决办法1:
(临时)在命令行中登陆Mysql,执行:SET sql_mode ='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
解决办法2:
(永久)在Mysql的配置文件my.cnf修改sql_mode值(去掉里面的ONLY_FULL_GROUP_BY),重启MySQL即可。----- 配置文件my.conf在哪 -----
(0)Linux下,参考:Linux下MySQL配置文件my.ini位置,http://www.linuxidc.com/Linux/2013-01/77389.htm
(1)OSX下,需要自己复制出来, sudo cp /usr/local/mysql/support-files/my-medim.cnf /etc/my.cnf,重启mysql即可
(2)windows下,参考Windows下MySQL5.6查找my.ini配置文件,http://blog.csdn.net/mayor125/article/details/54140454
相关文章推荐
- mysql查询报错: ORDER BY clause is not in GROUP BY..this is incompatible with sql_mode=only_full_group_by
- mysql查询报错: ORDER BY clause is not in GROUP BY..this is incompatible with sql_mode=only_full_group_by
- ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregate
- [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated..
- [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c
- [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c
- SELECT list is not in GROUP BY clause and contains nonaggregated column this is incompatible with sql_mode=only_full_group_by
- [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated..
- mysql 1130错误 和1055 - Expression #1 of ORDER BY clause is not in GROUP BY
- [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated.
- mysql 5.7 [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonag
- [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c
- SQL---Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column '
- [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c
- mysql 5.7会遇到 [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause ...的问题
- [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c
- [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause...
- [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c
- MySQL异常:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggr
- [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c