of partmusic to seethe access privileges for
all users if you specify both, you can exhaustively explore
all users of all databases mysqlaccess --user=root --password=the_mysql_root_password '*' '*'A particularly useful feature of mysqlaccess is that it shows what privileges a current user would have for any new database that is created. For example, part of the output of the previous command is:
Access-rights for USER 'partmusic', from HOST 'localhost', to DB 'ANY_NEW_DB'
+-----------------------+---+ +----------------------+---+
| Select_priv | N | | Lock_tables_priv | N |
| Insert_priv | N | | Execute_priv | N |
| Update_priv | N | | Repl_slave_priv | N |
| Delete_priv | N | | Repl_client_priv | N |
| Create_priv | N | | Create_view_priv | N |
| Drop_priv | N | | Show_view_priv | N |
| Reload_priv | N | | Create_routine_priv | N |
| Shutdown_priv | N | | Alter_routine_priv | N |
| Process_priv | N | | Create_user_priv | N |
| File_priv | N | | Ssl_type | ? |
| Grant_priv | N | | Ssl_cipher | ? |
| References_priv | N | | X509_issuer | ? |
| Index_priv | N | | X509_subject | ? |
| Alter_priv | N | | Max_questions | 0 |
| Show_db_priv | N | | Max_updates | 0 |
| Super_priv | N | | Max_connections | 0 |
| Create_tmp_table_priv | N | | Max_user_connections | 0 |
+-----------------------+---+ +NOTE A password is required for user `partmusic' The following rules are used:
db : 'No matching rule'
host : 'Not processed host-field is not empty in db-table.'
user : 'localhost','partmusic','652f9c175d1914f9','N','N','N','N',
'N','N','N','N','N','N','N','N','N','N','N','N','N','N','N',
'N','N','N','N','N','N','N','','','','','0','0','0','0'
It also shows what privileges an anonymous user has for all current databases:
Access-rights for USER 'ANY_NEW_USER', from HOST 'localhost', to DB 'ANY_NEW_DB'
+-----------------------+---+ +----------------------+---+
| Select_priv | N | | Lock_tables_priv | N |
| Insert_priv | N | | Execute_priv | N |
| Update_priv | N | | Repl_slave_priv | N |
| Delete_priv | N | | Repl_client_priv | N |
| Create_priv | N | | Create_view_priv | N |
| Drop_priv | N | | Show_view_priv | N |
| Reload_priv | N | | Create_routine_priv | N |
| Shutdown_priv | N | | Alter_routine_priv | N |
| Process_priv | N | | Create_user_priv | N |
| File_priv | N | | Ssl_type | ? |
| Grant_priv | N | | Ssl_cipher | ? |
| References_priv | N | | X509_issuer | ? |
Share with your friends: