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 do i allow users to download a xls file in html?
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 can i add hibernate plugin to eclipse?
how i can get jqfade.js library
how can i make monthly register ?
how can i remove newline characters and tabs
how can i create a discussion forum?
How can I to my database to my application
how can i display a pdf file in a jtextarea
How can I protect my database password ?
How can i modify my account in roseindia
How do i get the number of online users from a site using jsp?
How can I create sessionfactory in Hibernate?
How can i use Facebook connect button
how can i close a frame. - Java Beginners
How I can cast a variable in Scala?
how can i print the selected content of a frame
How can I change UIButton title color?
how can i set an object in focus
how can i simplify my java code
how can i export a .jar file include .mbd file?
How can i search and insert within a query
How to connect to MySQL from command prompt?
What is the default session time in php and how can I change it?
How many ways I can redirect a PHP page?

Ads