1.查看所有的庫(kù)
show databases;
2.查看當(dāng)前庫(kù)下的所有表
show tables;
show tables from world;
3.查看當(dāng)前并發(fā)會(huì)話(huà)信息
show processlist;
show full processlist;
4.查看數(shù)據(jù)庫(kù)支持的權(quán)限
show privileges;
5.查看數(shù)據(jù)庫(kù)信息
show variables;
show variables like '%trx%';
6.查看字符集&校對(duì)規(guī)則
show charset;
show collation;
7.查看用戶(hù)權(quán)限
show grants for root@'localhost';
8.查看支持的存儲(chǔ)引擎
show engines;
9.查詢(xún)表中索引信息
show index from world.city;
10.查詢(xún)數(shù)據(jù)庫(kù)當(dāng)前狀態(tài)信息
show status;
show status like '%lock%';
11.查看innodb引擎相關(guān)的狀態(tài)信息(內(nèi)存,事務(wù)疏叨,鎖潘靖,線(xiàn)程)
show engine innodb status\G
12.查看二進(jìn)制日志相關(guān)信息
show binary logs ;
show master status;
show binlog events in 'xxxx';
13.查看主從復(fù)制相關(guān)信息
show relaylog events in 'xxxx';
show slave status \G
14.終極大招
help show;