MySQL数据库升级到8.0+以后Discuz! 后台更新缓存时出现以下错误
(1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'system>0' at line 1
SELECT COUNT(*) FROM common_usergroup WHERE type='special' and system>0
(1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups = '' AND starttime<=1532077291 AND (endtime>=1532077291 OR endtime=0) ORD' at line 1
SELECT * FROM forum_announcement WHERE type!=2 AND groups = '' AND starttime<=1532077291 AND (endtime>=1532077291 OR endtime=0) ORDER BY displayorder, starttime DESC, id DESC LIMIT 1
因为MySQL 8.0+将system和groups作为了关键字,所以不能直接在SQL中将system和groups这两个词作为数据库、数据表、数据表字段中的任意一种使用,如果数据库名或数据表名或数据表字段名使用了sys