dcsimg
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: SQL
Expertise: Intermediate
May 29, 2019

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


Understanding What Grants a User Has in MySQL

MySQL allows various permissions to be set for users during (or after) creation. The following command comes handy to understand what GRANTS a user has.

Command: SHOW GRANTS FOR user;

In the above command, replace the user with the real username to know the GRANTS associated with the user.

Sample:

SHOW GRANTS FOR root; 

Results in:

+-------------------------------------------------------------+
| Grants for root@%                                 |
+-------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION |
+-------------------------------------------------------------+ 
M S Sridhar
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Thanks for your registration, follow us on our social networks to keep up-to-date