Expression #1 of ORDER BY clause is not in SELECT list, references column 'xxxx' which is not in SELECT list; this is incompatible with DISTINCT
mysql升级到5.7.31后,访问系统报错;
解决办法:
修改/etc/my.cnf
文件底部追加:
[mysqld]
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
参考资料:
https://blog.csdn.net/hanshanyunhai/article/details/105701771