mysql,导入sql文件报错 ERROR 1366 (HY000): Incorrect string value: '\xE5\xBC\xA0\xE4\xB8\x89' for c

原因是建立的数据库里有不是utf-8编码,

 本人的解决方案:

set character_set_client = utf8;

set character_set_server = utf8;

set character_set_connection = utf8;

set character_set_results = utf8;

set collation_connection = utf8_general_ci;

set collation_database = utf8_general_ci;

set collation_server = utf8_general_ci;

再次查看

 

 然后在执行sql文件就可以了。

 

 参考来自:  https://www.cnblogs.com/carious/p/10152013.html

posted @ 2020-01-06 10:06  经不起丶似水流年  阅读(2184)  评论(0编辑  收藏  举报