查看MySQL变量命令:
show variables;
会出现很多的变量,比如连接超时时间、写入超时时间、MySQL版本等等
查看数据库编码命令:
show variables like "char%";
+--------------------------+--------+
| 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 | |
+--------------------------+--------+
8 rows in set (0.00 sec)
可以展示数据库相关编码信息