Completely resolve Phpcms V9 upgrade, the article published: MySQL query:select * from ' withli_a '. ' V9_keyword ' WHERE ' keyword ' = ' roar ' and ' siteid ' = ' 1 ' limi T 1
MySQL Error:illegal mix of collations (latin1_swedish_ci,implicit) and (gbk_chinese_ci,coercible) for operation ' = '
MySQL errno:1267
Message:illegal mix of collations (latin1_swedish_ci,implicit) and (gbk_chinese_ci,coercible) for operation ' = '
(The above error code appears in Phpcms v9)
The above error is a problem with inconsistent database character sets.
Solution, enter the phpMyAdmin to execute the SQL statement:
To modify the encoding of a table:
ALTER TABLE ' V9_keyword ' DEFAULT CHARACTER SET gbk COLLATE gbk_chinese_ci
To modify the encoding of a field:
ALTER TABLE ' v9_keyword ' change ' keyword ' keyword ' CHAR (MB) CHARACTER SET GBK COLLATE gbk_chinese_ci not NULL
And then it's OK.
(Red characters, please modify the data table you need to modify in your database, please change the blue characters to the fields you need to modify in your database)
(Yellow background characters change to the encoding you want to modify, if you want to modify into UTF8, it should be UTF8 and utf8_bin) finally resolved.
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/web/Skills/