How can I show users privileges in MySQL?

Ads
 

How can I show users privileges in MySQL?

Hi,

How can I show user's privileges in MySQL?

I want to know what is accessible to user in MySQL database. How to check this?

Thanks

View Answers

November 5, 2017 at 7:02 PM

Hi,

To view grant for a user you can use following sql query:

show grants for username;

Here is simple usage:

mysql> show grants for webservice;
+-----------------------------------------------------------------------------------------------------------+
| Grants for [email protected]%                                                                                   |
+-----------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'webservice'@'%' IDENTIFIED BY PASSWORD 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' |
| GRANT ALL PRIVILEGES ON `mydb`.* TO 'webservice'@'%'                                                  |
+-----------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

mysql>

Thanks

Ads









Related Tutorials/Questions & Answers:
How can I show users privileges in MySQL?
How to view a list of MySQL users and their privileges?
Advertisements
how can i hide and show tables
How can I do it? .click();
How can I learn Java?
how should i can solve
how can i display a editable result of form?
how do i allow users to download a xls file in html?
how can i add hibernate plugin to eclipse?
how i can get jqfade.js library
how can i display a pdf file in a jtextarea
how can i remove newline characters and tabs
how can i make monthly register ?
how can i create a discussion forum?
How can i modify my account in roseindia
How can I master Java in one month?
how can i print the selected content of a frame
how can i set an object in focus
How can i use Facebook connect button
How can I create sessionfactory in Hibernate?
How can I change UIButton title color?
How I can cast a variable in Scala?
How I can cast a variable in Scala?
How can i search and insert within a query
how can i export a .jar file include .mbd file?
How to connect to MySQL from command prompt?
How can i Dispose Dialog box From LWUIT Component >
How can I output text typed in textarea by user on the same page?
how can i use ajax and jquery in netbeans ide
ModuleNotFoundError: No module named 'mysqlx-connector'
Can i use Scriptlets inside javascript,if so how?

Ads