解决Mysql中文报错问题

Incorrect string value: '\xE5\xBC\xA0\xE4\xB8\x8'

MySQL里的ERROR 1366(HY000):Incorrect string value问题
 


使用alert database databaseName 
character set utf8 更改数据库的编码格式
 

alter table tableName convert to character set utf8;

查看数据里字符集 
在终端进入数据库,输入以下命令:

show variables like '%char%';

猜你喜欢

转载自blog.csdn.net/han0373/article/details/81413717
今日推荐