) _$ e% b* m( {8 ]; R8 S1 Y m9 W6 H; u7 W/ N[Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.; L5 ^& B5 h0 Z' h
說明: 千萬不能照它建議用"UTF8MB4",否則無法成功啟動6 y0 x" h6 A0 [5 x/ }# h$ C
1 R% `1 a. F+ |1 K$ \
(2)( ]* V$ Z7 @$ [5 j1 }& U
(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$ B: j4 X; ]2 Y
SELECT COUNT(*) FROM common_usergroup WHERE type='special' and system>0* r8 u" D1 [8 n+ B( [/ D0 i
& z0 L, A0 z( J; s(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% p, x, c5 y! o- Y! g6 |
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 17 L% R) f$ v& }. g( G8 `7 E8 h* _
- T2 Y- l/ E' V$ X1 F7 o
因為MySQL 8.0+將system和groups作為了關鍵字,所以不能直接在SQL中將system和groups這兩個詞作為數據庫、數據表、數據表字段中的任意一種使用,如果數據庫名或數據表名或數據表字段名使用了system或groups作為名字,必須使用一對反引號引用起來。寫作`system`或`groups`。 9 M' Z8 P" u3 b' ]1 l) ?& O# _/ W9 A% P! f; @
第一個錯誤需要找到Discuz!目錄中的source\class\table\table_common_usergroup.php,' X% ]& }! S j9 _8 u$ Q$ Q% |+ a+ j
將文件中所有的system全部改成`system`,保存後重新上傳到服務器的相同目錄即可。 % x- }2 ]/ n3 m0 g; `7 @4 L : h" `: `* J8 R7 }" o; Q* r7 t第二個錯誤需要找到Discuz!目錄下中的source\class\table\table_forum_announcement.php," U+ v" o8 l! x6 l; [! k' g
將文件中所有的groups全部改為`groups`,保存後重新上傳到服務器的相同目錄即可。% O* v# {6 n5 ^; G
$ A. j: S' y& `' y% |為了避免語法錯誤,在寫SQL語句時,一定要為所有的數據庫名、數據表名、數據表字段名全部添加一對反引號,像Discuz!這樣的寫法是很不妥的。" O" o, S( L l' n) a9 a
以上參考: 升級到 MySQL 8.0+ 後Discuz! 更新緩存時出現SQL語法錯誤& l# R* X: s+ N/ G