mysql cannot insert Chinese question
- 2020-05-12 06:20:22
- OfStack
Problem phenomena:
A similar error occurs when inserting Chinese into mysql 5.5
ERROR 1366 (HY000): Incorrect string value: '\xD6\xD0\xCE\xC4' for column
Reasons for the problem:
The Db characterset character set is latin1
Solutions:
Modify the my.ini file in the mysql installation directory to
default-character-set=utf8
character-set-server=utf8
The mysql service then recreates a database.
A similar error occurs when inserting Chinese into mysql 5.5
ERROR 1366 (HY000): Incorrect string value: '\xD6\xD0\xCE\xC4' for column
Reasons for the problem:
The Db characterset character set is latin1
Solutions:
Modify the my.ini file in the mysql installation directory to
default-character-set=utf8
character-set-server=utf8
The mysql service then recreates a database.