龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > 数据库类 > MySQL 技术 >

Liunx环境下MySQL字符集的修改方法(1)(2)

时间:2011-04-12 23:18来源:未知 作者:admin 点击:
分享到:
3. 修改my.cnf vi/etc/my.cnf 在[client]下添加 default-character-set = utf8 在[mysqld]下添加 default-character-set = utf8 4.重新启动MySQL [root@bogon~]#/etc/rc.d/init.d/mysqlrestart Shuttin
3. 修改my.cnf

  1. vi /etc/my.cnf 

在[client]下添加

  1. default-character-set=utf8 

在[mysqld]下添加
 

  1. default-character-set=utf8 

4.重新启动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.  
  10. Type 'help;' or 'h' for help. Type 'c' to clear the buffer.  


精彩图集

赞助商链接