日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問(wèn)題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
Liunx環(huán)境下MySQL字符集的修改方法

MySQL字符集的修改在不同的環(huán)境下有不同的方法,下面為您介紹的是在Liunx環(huán)境下MySQL字符集的修改方法,如果您對(duì)此方面感興趣的話,不妨一看。

創(chuàng)新互聯(lián)自2013年創(chuàng)立以來(lái),先為蓬江等服務(wù)建站,蓬江等地企業(yè),進(jìn)行企業(yè)商務(wù)咨詢服務(wù)。為蓬江企業(yè)網(wǎng)站制作PC+手機(jī)+微官網(wǎng)三網(wǎng)同步一站式服務(wù)解決您的所有建站問(wèn)題。

Liunx下修改MySQL字符集:

1.查找MySQL的cnf文件的位置

 
 
 
  1. find / -iname '*.cnf' -print
  2. /usr/share/mysql/my-innodb-heavy-4G.cnf
  3. /usr/share/mysql/my-large.cnf
  4. /usr/share/mysql/my-small.cnf
  5. /usr/share/mysql/my-medium.cnf
  6. /usr/share/mysql/my-huge.cnf
  7. /usr/share/texmf/web2c/texmf.cnf
  8. /usr/share/texmf/web2c/mktex.cnf
  9. /usr/share/texmf/web2c/fmtutil.cnf
  10. /usr/share/texmf/tex/xmltex/xmltexfmtutil.cnf
  11. /usr/share/texmf/tex/jadetex/jadefmtutil.cnf
  12. /usr/share/doc/MySQL-server-community-5.1.22/my-innodb-heavy-4G.cnf
  13. /usr/share/doc/MySQL-server-community-5.1.22/my-large.cnf
  14. /usr/share/doc/MySQL-server-community-5.1.22/my-small.cnf
  15. /usr/share/doc/MySQL-server-community-5.1.22/my-medium.cnf
  16. /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其中的一個(gè)到/etc下,命名為my.cnf

 
 
 
  1. cp /usr/share/mysql/my-medium.cnf /etc/my.cnf

#p#3. 修改my.cnf

 
 
 
  1. vi /etc/my.cnf

在[client]下添加

 
 
 
  1. default-character-set=utf8

在[mysqld]下添加

 
 
 
  1. default-character-set=utf8

4.重新啟動(dòng)MySQL

 
 
 
  1. [root@bogon ~]# /etc/rc.d/init.d/mysql restart
  2. Shutting down MySQL                                        [ 確定 ]
  3. Starting MySQL.                                            [ 確定 ]
  4. [root@bogon ~]# mysql -u root -p
  5. Enter password:
  6. Welcome to the MySQL monitor. Commands end with ; or \g.
  7. Your MySQL connection id is 1
  8. Server version: 5.1.22-rc-community-log MySQL Community Edition (GPL)
  9. Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

#p#5.查看MySQL字符集設(shè)置

 
 
 
  1. mysql> show variables like 'collation_%';
  2. +----------------------+-----------------+
  3. | Variable_name        | Value           |
  4. +----------------------+-----------------+
  5. | collation_connection | utf8_general_ci |
  6. | collation_database   | utf8_general_ci |
  7. | collation_server     | utf8_general_ci |
  8. +----------------------+-----------------+
  9. 3 rows in set (0.02 sec)
  10. mysql> show variables like 'character_set_%';
  11. +--------------------------+----------------------------+
  12. | Variable_name            | Value                      |
  13. +--------------------------+----------------------------+
  14. | character_set_client     | utf8                       |
  15. | character_set_connection | utf8                       |
  16. | character_set_database   | utf8                       |
  17. | character_set_filesystem | binary                     |
  18. | character_set_results    | utf8                       |
  19. | character_set_server     | utf8                       |
  20. | character_set_system     | utf8                       |
  21. | character_sets_dir       | /usr/share/mysql/charsets/ |
  22. +--------------------------+----------------------------+
  23. 8 rows in set (0.02 sec)
  24. mysql>

文章標(biāo)題:Liunx環(huán)境下MySQL字符集的修改方法
轉(zhuǎn)載來(lái)源:http://www.5511xx.com/article/dhgihes.html