**********数据库从5.7升级到8.0版本问题(高版本不兼容情况)

 

 

 

 

 

 

 

 

 

 

 

 

 

 可以看出已恢复,从上面的截图可以看出

Mysql高版本sql模式兼容问题

yh_nick

于 2021-10-25 15:17:32 发布

355
收藏
文章标签: mysql 数据库 sql
版权
mysql启动报错:com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #5 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘crm9.ccb.type_id’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
解决方法:
在myslq配置文件my.cnf或my.ini中设置:
[mysqld]
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION

注意不要带空格,不要包含”NO_AUTO_CREATE_USER“,这一项已在mysql8中去除,否则会报出如下错误:
[ERROR] [MY-000077] [Server] /usr/sbin/mysqld: Error while setting value ‘STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION’ to ‘sql_mode’.
/usr/sbin/mysqld: Error while setting value ‘STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION’ to ‘sql_mode’.
————————————————
版权声明:本文为CSDN博主「yh_nick」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/yh_nick/article/details/120952651

posted @ 2022-10-01 22:30  往事已成昨天  阅读(588)  评论(1编辑  收藏  举报