刘政道 - 应用程序框架

《31天学会CRM项目开发(C#编程入门及项目实战)》作者,IT经理,程序员
  博客园  :: 新随笔  :: 联系 :: 管理

Linux Mysql Charset utf8

Posted on 2009-10-10 08:33  刘政道  阅读(332)  评论(0编辑  收藏  举报

Linux:Red Hat Enterprise Linux 5.0

rpm -ivh MySQL-server-community-5.1.39-0.rhel5.i386.rpm

rpm -ivh MySQL-client-community-5.1.39-0.rhel5.i386.rpm


Where is my.cnf?

You should find the my-large.cnf first.

The my-large.cnf is in /usr/share/mysql/. You should copy the my-large.cnf to /etc/my.cnf.


You can modify my.cnf like this:


[mysql]

default_character_set=utf8

[mysqld]

default_character_set=utf8


If default_character_set not defined, you should add this code.