Collections:
Viewing User Privileges in MySQL
How To View User Privileges in MySQL?
✍: FYIcenter.com
If a regular user wants to see his/her own granted privileges, he/she can use the "SHOW GRANTS" command. If the "root" user wants to see other user's granted privileges, he/she can use the "SHOW GRANTS FOR userName" command. The following tutorial exercise shows you how to view user's granted privileges:
>cd \mysql\bin >mysql -u root -pretneciyf mysql> SHOW GRANTS; +------------------------------------------------------ | Grants for root@localhost +------------------------------------------------------ | GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost'... +------------------------------------------------------ 1 row in set (0.00 sec) mysql> SHOW GRANTS for dev; +------------------------------------------------------ | Grants for dev@% | +------------------------------------------------------ | GRANT CREATE ON *.* TO 'dev'@'%' ... +------------------------------------------------------ 1 row in set (0.00 sec) mysql> SHOW GRANTS for qa; +------------------------------------------------------ | Grants for qa@% | +------------------------------------------------------ | GRANT USAGE ON *.* TO 'qa'@'%' ... | GRANT CREATE ON `faq`.* TO 'qa'@'%' +------------------------------------------------------ 2 rows in set (0.00 sec)
The output says:
⇒ Revoking User Privileges in MySQL
⇐ Giving Privileges at the Database Level in MySQL
2017-08-21, 1471🔥, 0💬
Popular Posts:
How to download and install Microsoft SQL Server Management Studio Express in SQL Server? Microsoft ...
Where to find answers to frequently asked questions on Managing Security, Login and User in SQL Serv...
What is sqlservr.exe - Process - SQL Server (SQLEX?PRESS) in SQL Server? Process sqlservr.exe is the...
Why I Can Not Enter 0.001 Second in DATETIME values in SQL Server Transact-SQL? If you enter millise...
How To Install PHP on Windows in MySQL? The best way to download and install PHP on Windows systems ...