mysql-show 語句列表

1.查看所有的庫

show databases;

2.查看當(dāng)前庫下的所有表

show tables;
show tables from world;

3.查看當(dāng)前并發(fā)會話信息

show processlist;
show full processlist;

4.查看數(shù)據(jù)庫支持的權(quán)限

show privileges;

5.查看數(shù)據(jù)庫信息

show variables;
show variables like '%trx%';

6.查看字符集&校對規(guī)則

show charset;
show collation;

7.查看用戶權(quán)限

show grants for root@'localhost';

8.查看支持的存儲引擎

show engines;

9.查詢表中索引信息

show index from world.city;

10.查詢數(shù)據(jù)庫當(dāng)前狀態(tài)信息

show status;
show status like '%lock%';

11.查看innodb引擎相關(guān)的狀態(tài)信息(內(nèi)存,事務(wù),鎖,線程)

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;
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容