欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

查看MySQL数据库的默认编码_MySQL

程序员文章站 2022-05-08 10:05:36
...
bitsCN.com

查看MySQL数据库的默认编码

1、使用status命令能够显示数据库的相关系信息,示例如下:

mysql> status;————–mysql Ver 14.12 Distrib 5.0.77, for Win32 (ia32)Connection id:          1072Current database:Current user:           test@119.119.247.6SSL:                    Not in useUsing delimiter:        ;Server version:         5.0.67-log MySQL Community Server (GPL)Protocol version:       10Connection:             www.chinajvm.com via TCP/IPServer characterset:    gbkDb     characterset:    gbkClient characterset:    latin1Conn. characterset:    latin1TCP port:               3306Uptime:                 15 days 2 hours 21 min 37 sec

2、也可以使用如下命令:

mysql> show variables like’char%’;+————————–+——————————————–+| Variable_name            | Value                                      |+————————–+——————————————–+| character_set_client     | latin1                                     || character_set_connection | latin1                                     || character_set_database | gbk                                        || character_set_filesystem | binary                                     || character_set_results    | latin1                                     || character_set_server     | gbk                                        || character_set_system     | utf8                                       || character_sets_dir       | /mysql/mastermysql50/share/mysql/charsets/ |+————————–+——————————————–+8 rows in set (0.03 sec)


bitsCN.com