1.查看所有的库
show databases;
2.查看当前库下的所有表
show tables;
show tables from world;
3.查看当前并发会话信息
show processlist;
show full processlist;
4.查看数据库支持的权限
show privileges;
5.查看数据库信息
show variables;
show variables like '%trx%';
6.查看字符集&校对规则
show charset;
show collation;
7.查看用户权限
show grants for root@'localhost';
8.查看支持的存储引擎
show engines;
9.查询表中索引信息
show index from world.city;
10.查询数据库当前状态信息
show status;
show status like '%lock%';
11.查看innodb引擎相关的状态信息(内存,事务,锁,线程)
show engine innodb status\G
12.查看二进制日志相关信息
show binary logs ;
show master status;
show binlog events in 'xxxx';
13.查看主从复制相关信息
show relaylog events in 'xxxx';
show slave status \G
14.终极大招
help show;