I have my website on a shared webhost who allows me to have shell access to do mysql queries among other things. when granting access for users to a database, is there a way to list the users i’ve added and their privlages?
Right now i can find out what privlages i have for myself
mysql> show grants for geek@"%";
+-----------------------------------------------------------------------------+
| Grants for geek@% |
+-----------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'geek'@'%' IDENTIFIED BY PASSWORD '<encrypted>' |
| GRANT ALL PRIVILEGES ON Forum.* TO 'geek'@'%' WITH GRANT OPTION |
| GRANT ALL PRIVILEGES ON newsletter.* TO 'geek'@'%' WITH GRANT OPTION |
| GRANT ALL PRIVILEGES ON testdb.* TO 'geek'@'%' WITH GRANT OPTION |
| GRANT ALL PRIVILEGES ON survey.* TO 'geek'@'%' WITH GRANT OPTION |
+-----------------------------------------------------------------------------+
5 rows in set (0.00 sec)
but trying to do
mysql> show grants for “%”; and
mysql> show grants for geek2@“%”; (i created the geek2 user)
yields
ERROR 1044: Access denied for user: ‘geek@localhost’ to database ‘mysql’
How do i find out which users have access to my database and the privlages granted (for example “survey”)?