使用status命令能够显示数据库的相关系信息,示例如下:
mysql> status;
————–
mysql Ver 14.12 Distrib 5.0.77, for Win32 (ia32)
Connection id: 1072
Current database:
Current user: test@119.119.247.6
SSL: Not in use
Using delimiter: ;
Server version: 5.0.67-log MySQL Community Server (GPL)
Protocol version: 10
Connection: www.chinajvm.com via TCP/IP
Server characterset: gbk
Db characterset: gbk
Client characterset: latin1
Conn. characterset: latin1
TCP port: 3306
Uptime: 15 days 2 hours 21 min 37 sec
也可以使用如下命令:
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)