Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'blog.t_blog.addTime' which is not functi

sql报错:

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'blog.t_blog.addTime' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by


 

select @@global.sql_mode;

 set @@global.sql_mode=(select replace(@@global.sql_mode,'ONLY_FLL_GROUP_BY',''));

然后重启mysql:service mysql restart;

 

posted @ 2018-10-24 14:07  笔记Next  阅读(1291)  评论(0编辑  收藏  举报