1055:Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'blog.tp_wechat.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by [ SQL语句 ] : SELECT * FROM `aa` GROUP BY openid ORDER BY addtime asc LIMIT 0,20
因为版本不兼容,mysql5.7以上的版本以后要求各种操作更加严谨修改配置文件 登录linux服务器 vim /etc/my.cnf
mysqld下面如果存在sql_mode 则改为 sql_mode=""
或者 仅去掉 ONLY_FULL_GROUP_BY,
然后重启服务器 service mysqld restart