数据库

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


下载一个程序,本地配置测试后提示:Expression #1 of ORDER BY clause is not in SELECT list, references column 'xxxx' which is not in SEL,经过查询发现是mysql的版本问题导致的兼容问题。


主要是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

 


0.073335s