1、统计指定数据库下表的数量
mysql > use information_schema;
mysql > SELECT count(TABLE_NAME) FROM information_schema.TABLES WHERE TABLE_SCHEMA='dbname';
2、命令行导入.sql文件
mysql > source /home/dbname.sql;
3、命令行查看表创建语句
mysql > show create table table_name G;
4、修改某张表的字符编码和某个字段的编码
mysql > alter table table_name DEFAULT CHARACTER SET utf8;
mysql > ALTER TABLE table_name CHANGE column_name column_name VARCHAR(36) CHARACTER SET utf8 NOT NULL;
或者 ALTER TABLE table_name modify column_name VARCHAR(36) CHARACTER SET utf8 NOT NULL;
持续更新中...