How can I show users privileges in MySQL?

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 webservice@%                                                                                   |
+-----------------------------------------------------------------------------------------------------------+
| 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









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
ModuleNotFoundError: No module named 'mysqlx-connector'
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 do i get the number of online users from a site using jsp?
how can i display a editable result of form?
PHP MySQLi Affected Rows
Hibernate 5 MySQL5 Dialect
Hibernate 5 MySQL5 Dialect
Hibernate 5 MySQL5 Dialect
PHP MySQLi
ModuleNotFoundError: No module named 'privileges'
how can i display a pdf file in a jtextarea
how can i add hibernate plugin to eclipse?
how i can get jqfade.js library
i have created interface program for simple arithmetic operation but its show some error can i get reason and mistakes
i have created interface program for simple arithmetic operation but its show some error can i get reason and mistakes
how can i remove newline characters and tabs
how can i make monthly register ?
how can i create a discussion forum?
How can I learn Java in 5 minutes
How can I to my database to my application
How can i modify my account in roseindia
How can I protect my database password ?
how can i set an object in focus
How can I master Java in one month?
how can i print the selected content of a frame
How can i use Facebook connect button
how can i close a frame. - Java Beginners
How can I create sessionfactory in Hibernate?
How can I start big data?
How can I get IBM certification for free?
How can I practice big data at home?
How can I become a data scientist for free?
How can I become a good data scientist?
How can I get into big data?
How can I learn Hadoop easily?
How can I do data science course?
How can I become a data scientist?
How can I become a data scientist in India?
How can I go to ISRO after BSc?
How quickly can I learn Python?
How can I teach myself Python?
How can I learn Python fast?
How can I learn Python finance?
How can I learn data science in India?

Ads