本节内容:
如何查看mysql/ target=_blank class=infotextkey>mysql数据库的默认编码
方法1、使用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
方法2、使用show variables like’char%’;命令查看mysql编码
复制代码 代码示例:
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)