MySQL字符集的修改在不同的環境下有不同的方法,下面為您介紹的是在Liunx環境下MySQL字符集的修改方法,如果您對此方面感興趣的話,不妨一看。
Liunx下修改MySQL字符集:
1.查找MySQL的cnf文件的位置
- find / -iname '*.cnf' -print
- /usr/share/mysql/my-innodb-heavy-4G.cnf
- /usr/share/mysql/my-large.cnf
- /usr/share/mysql/my-small.cnf
- /usr/share/mysql/my-medium.cnf
- /usr/share/mysql/my-huge.cnf
- /usr/share/texmf/web2c/texmf.cnf
- /usr/share/texmf/web2c/mktex.cnf
- /usr/share/texmf/web2c/fmtutil.cnf
- /usr/share/texmf/tex/xmltex/xmltexfmtutil.cnf
- /usr/share/texmf/tex/jadetex/jadefmtutil.cnf
- /usr/share/doc/MySQL-server-community-5.1.22/my-innodb-heavy-4G.cnf
- /usr/share/doc/MySQL-server-community-5.1.22/my-large.cnf
- /usr/share/doc/MySQL-server-community-5.1.22/my-small.cnf
- /usr/share/doc/MySQL-server-community-5.1.22/my-medium.cnf
- /usr/share/doc/MySQL-server-community-5.1.22/my-huge.cnf
2. 拷貝 small.cnf、my-medium.cnf、my-huge.cnf、my-innodb-heavy-4G.cnf其中的一個到/etc下,命名為my.cnf
- cp /usr/share/mysql/my-medium.cnf /etc/my.cnf