show databases;查看所有的数据库
修改字符集:
数据库:alter database 数据库名 character set utf8;
表:alter table 表名 convert to character set gbk;
字段:alter table 表名 modify column 字段名 varchar(30) character set gbk not null;
查看字符集:
数据库: show variables like '%char%';
表:show table status from 数据库名 like '%表名%';
字段:show full columns from 表名;