最后查看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 | D:\Work\MySQL\mysql-5.6.40-winx64\share\charsets\ |
+--------------------------+---------------------------------------------------+
#创建新的数据库,查看编码,默认为utf-8编码。
create database munan;
show create database munan;
+----------+----------------------------------------------------------------+
| Database | Create Database |
+----------+----------------------------------------------------------------+
| munan | CREATE DATABASE `munan` /*!40100 DEFAULT CHARACTER SET utf8 */ |
+----------+----------------------------------------------------------------+