Use these commands in the mysql shell to get all mysql users and their permissions to databases:
# Get a list of users: SELECT host,user,authentication_string FROM mysql.user; # List Perms for a user: SHOW GRANTS FOR 'user_name'@'localhost';
- by Zsolt Agoston - last edited on
Use these commands in the mysql shell to get all mysql users and their permissions to databases:
# Get a list of users: SELECT host,user,authentication_string FROM mysql.user; # List Perms for a user: SHOW GRANTS FOR 'user_name'@'localhost';
To provide the best experiences, we and our partners use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us and our partners to process personal data such as browsing behavior or unique IDs on this site and show (non-) personalized ads. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Click below to consent to the above or make granular choices. Your choices will be applied to this site only. You can change your settings at any time, including withdrawing your consent, by using the toggles on the Cookie Policy, or by clicking on the manage consent button at the bottom of the screen.
Comments