1.保证mysql数据的编码为utf8 启动mysql mysql -hlocalhost -uroot -p 输入密码 show VARIABLES like 'character_%'; SET character_set_client='utf8'; SET character_set_connection='utf8'; SET character_set_results='utf8'; 2.已经生成数据库的,注意数据库的collation,表的collation,以及表中字符串列的co…