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 表名;