一:背景
Error 1055: Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'leyangjun_db.order.pay_at' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
二:原因
主要是数据库版本的问题
三:解决
查看命令:select @@sql_mode;
1:临时解决(机器重启后就会失效)
直接客户端指定命令:set global sql_mode='';
2:修改配置永久生效
修改 my.cnf 文件的 sql_mode,修改完配置记得重启MySQL