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文件就可以了。