mysql 中show 命令用法詳細介紹

2021-08-31 01:49:48 字數 1255 閱讀 9994

a. show tables或show tables from database_name; -- 顯示當前資料庫中所有表的名稱

b. show databases; -- 顯示mysql中所有資料庫的名稱

c. show columns from table_name from database_name; 或show columns from database_name.table_name; -- 顯示表中列名稱

d. show grants for user_name; -- 顯示乙個使用者的許可權,顯示結果類似於grant 命令

e. show index from table_name; -- 顯示表的索引

f. show status; -- 顯示一些系統特定資源的資訊,例如,正在執行的執行緒數量

g. show variables; -- 顯示系統變數的名稱和值

h. show processlist; -- 顯示系統中正在執行的所有程序,也就是當前正在執行的查詢。大多數使用者可以檢視他們自己的程序,但是如果他們擁有process許可權,就可以檢視所有人的程序,包括密碼。

i. show table status; -- 顯示當前使用或者指定的database中的每個表的資訊。資訊包括表型別和表的最新更新時間

j. show privileges; -- 顯示伺服器所支援的不同許可權

k. show create database database_name; -- 顯示create database 語句是否能夠建立指定的資料庫

l. show create table table_name; -- 顯示create database 語句是否能夠建立指定的資料庫

m. show engies; -- 顯示安裝以後可用的儲存引擎和預設引擎。

n. show innodb status; -- 顯示innodb儲存引擎的狀態

o. show logs; -- 顯示bdb儲存引擎的日誌 

p. show warnings; -- 顯示最後乙個執行的語句所產生的錯誤、警告和通知

q. show errors; -- 只顯示最後乙個執行語句所產生的錯誤 

r. show [storage] engines; --顯示安裝後的可用儲存引擎和預設引擎

s. show procedure status --顯示資料庫中所有儲存的儲存過程基本資訊,包括所屬資料庫,儲存過

程名稱,建立時間等

t. show create procedure sp_name --顯示某乙個儲存過程的詳細資訊

mysql 中show 命令用法詳細介紹

以下所有命令都是在進入mysql監控器中執行的 a.show tables或show tables from database name 顯示當前資料庫 中所有表的名稱 b.show databases 顯示mysql中所有資料庫 的名稱 c.show columns from table name...

mysql 中show 命令用法詳細介紹

以下所有命令都是在進入mysql監控器中執行的 a.show tables或show tables from database name 顯示當前資料庫中所有表的名稱 b.show databases 顯示mysql中所有資料庫的名稱 c.show columns from table name f...

mysql 中show 命令用法詳細介紹

a.show tables或show tables from database name 顯示當前資料庫中所有表的名稱 b.show databases 顯示mysql中所有資料庫的名稱 c.show columns from table name from database name 或show ...