Expression #1 of ORDER BY clause is not in SELECT list, references column 'xxxx' which is

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

上一篇:leetcode 152


下一篇:leetcode练习——排序和搜索(颜色分类)