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;

猜你喜欢

转载自www.cnblogs.com/mryangbo/p/9842983.html