A statement that shows the privileges for a user from any host
SHOW GRANTS FOR dba;
The result set
A statement that shows the privileges for a user from a specific host
SHOW GRANTS FOR mgs_user@localhost;
The result set
A statement that shows the privileges for the current user
SHOW GRANTS;
Description
MySQL uses an internal database named mysql to keep track of its users. Within that database, MySQL uses a table named users to keep track of its users. You can query that table to get a list of users for the current MySQL server.
You can use the SHOW GRANTS statement to show the privileges for a user.