1.创建数据库
GBK: create database test2 DEFAULT CHARACTER SET gbk COLLATE gbk_chinese_ci;
UTF8: CREATE DATABASE `test2` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
2.删除数据库
drop database test2
3.导入数据
mysql --default-character-set=utf8 -u root -p test2<test2.sql
4.查看进程:
show processlist;
5.查看相关变量
show variables like '%cache%';
6.查看状态信息
show state like '%cache%';
7.查看及创建索引
create index idx_name on wp_posts(name)
show index from wp_posts;