我有一个在MySQL 5.6上运行良好的存储过程。在最近的服务器迁移中,我们升级到MySQL 5.7.19。
我的存储过程现在抛出错误:
Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'utility-monitor.daily_readings.building_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by: CALL monthly_readings(2017, 1, NULL, 1, 1))
我已经设置了sql_mode对""通过/var/mysql/my.cnf文件,重新启动mysql服务,并通过控制台,以确认登录的sql_mode通过是空白SELECT @@sql_mode;
尽管如此,当我尝试运行存储过程时,我仍然收到上述错误。
接下来,我该怎么办才能继续排除错误的出处?