1、mysql 字符集
[client]
default-character-set=utf8mb4
socket=/usr/local/mysql/mysql.sock
[mysql]
default-character-set=utf8mb4
socket=/usr/local/mysql/mysql.sock
[mysqld]
character_set_server=utf8mb4
collation_server=utf8mb4_bin
查看版本:SHOW VARIABLES WHERE Variable_name LIKE ‘version%’;
2、查看数据库和表字符集
查看数据库编码:
SHOW CREATE DATABASE db_name;
查看表编码:
SHOW CREATE TABLE table_name;
查看字段编码:
SHOW FULL COLUMNS FROM table_name;
3、查看代码连接mysql使用的字符集
阅读(1449) | 评论(0) | 转发(0) |