创建数据库或表指定charset
create database dbname default charset=utf8;
create table tablename(column1, column2 ...) default charset=utf8;
查看并修改当前数据库编码
show variables like 'character%';
alter database dbname character set utf8;
Paste_Image.png
修改变量编码
set character_set_client='latin1';
set character_set_server='latin1';
Paste_Image.png
网友评论