MySQL 9.0 發行說明
SHOW PRIVILEGES
SHOW PRIVILEGES
會顯示 MySQL 伺服器支援的系統權限清單。顯示的權限包括所有靜態權限和所有目前已註冊的動態權限。
mysql> SHOW PRIVILEGES\G
*************************** 1. row ***************************
Privilege: Alter
Context: Tables
Comment: To alter the table
*************************** 2. row ***************************
Privilege: Alter routine
Context: Functions,Procedures
Comment: To alter or drop stored functions/procedures
*************************** 3. row ***************************
Privilege: Create
Context: Databases,Tables,Indexes
Comment: To create new databases and tables
*************************** 4. row ***************************
Privilege: Create routine
Context: Databases
Comment: To use CREATE FUNCTION/PROCEDURE
*************************** 5. row ***************************
Privilege: Create role
Context: Server Admin
Comment: To create new roles
...
特定使用者的權限會由 SHOW GRANTS
語法顯示。如需詳細資訊,請參閱 第 15.7.7.22 節,「SHOW GRANTS 語法」。