Chinaunix首页 | 论坛 | 博客
  • 博客访问: 64091
  • 博文数量: 38
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 396
  • 用 户 组: 普通用户
  • 注册时间: 2015-07-12 14:46
文章分类

全部博文(38)

文章存档

2016年(11)

2015年(27)

我的朋友
最近访客

分类: 系统运维

2015-08-21 23:00:45

     查看本机字符集
(保持相同才不会乱码)

mysql> show variables like 'character_set%';

+--------------------------+-----------------------------------+

| Variable_name            | Value                             |

+--------------------------+-----------------------------------+

| character_set_client     | latin1                            |

| character_set_connection | latin1                            |

| character_set_database   | utf8                              |

| character_set_filesystem | binary                            |

| character_set_results    | latin1                            |

| character_set_server     | utf8                              |

| character_set_system     | utf8                              |

| character_sets_dir       | /usr/local/mysql5/share/charsets/ |

------------------------------------------------------------------------

有3会个和系统一样

[root@super64 ~]# vim /etc/sysconfig/i18n

 mysql> set names utf8;    #也是改这三个


 

 

mysql> show variables like 'character_set%';

+--------------------------+-----------------------------------+

| Variable_name            | Value                             |

+--------------------------+-----------------------------------+

| character_set_client     | latin1                            |

| character_set_connection | latin1                            |

| character_set_database   | utf8                              |

| character_set_filesystem | binary                            |

| character_set_results    | latin1                            |

| character_set_server     | utf8                              |

| character_set_system     | utf8                              |

| character_sets_dir       | /usr/local/mysql5/share/charsets/ |

+--------------------------+-----------------------------------+

8 rows in set (0.01 sec)

 

mysql> set names utf8;

Query OK, 0 rows affected (0.00 sec)

 

mysql> show variables like 'character_set%';

+--------------------------+-----------------------------------+

| Variable_name            | Value                             |

+--------------------------+-----------------------------------+

| character_set_client     | utf8                              |

| character_set_connection | utf8                              |

| character_set_database   | utf8                              |

| character_set_filesystem | binary                            |

| character_set_results    | utf8                              |

| character_set_server     | utf8                              |

| character_set_system     | utf8                              |

| character_sets_dir       | /usr/local/mysql5/share/charsets/ |

+--------------------------+-----------------------------------+

8 rows in set (0.01 sec)

 

阅读(552) | 评论(0) | 转发(0) |
0

上一篇:mysql忘记root密码

下一篇:linux启动过程

给主人留下些什么吧!~~