在MySQL中导入中文字符

时间:2011-02-04 13:45:29

标签: php mysql html encoding ems

  

可能重复:
  Import chinese character in mysql table.

如何将带有中文字符的Excel文件导入MySQL表(EMS管理器)。 谁能帮帮我吗?感谢。

1 个答案:

答案 0 :(得分:1)

默认连接在许多安装中都没有启用UTF-8,请在my.cnf中尝试:

[client]
default-character-set = utf8

[mysqld]
collation_server=utf8_unicode_ci
character_set_server=utf8
skip-character-set-client-handshake
default-character-set = utf8
default-collation = utf8_general_ci

如果无法设置上述内容,还有一种SQL方法可以连接:

SET NAMES UTF8
相关问题