View Permissions of an User Account

The SHOW GRANTS statement is used to view the permissions of a user account.

Syntax 

SHOW GRANTS FOR user-account;

SHOW GRANTS Statement Example

SHOW GRANTS FOR gfguser1@localhost;

Output: 
 

The *.* in the output denotes that the “gfguser1” user account can only login to the database server and has no other privileges. 


MySQL CREATE USER Statement

MySQL CREATE USER Statement allows users to create a new USER in the MySQL database.

Similar Reads

CREATE USER in MySQL

The CREATE USER statement in SQL is used to create a new user and a password to access that user....

Syntax

The syntax for the CREATE USER statement in MySQL is:...

MySQL CREATE USER Statement Examples

Let’s look at some examples of the CREATE USER command in MySQL, and understand it’s working....

View Permissions of an User Account

The SHOW GRANTS statement is used to view the permissions of a user account....