Checking User Permissions in MySQL

Posted by on October 26, 2011 in Database, MySQL | 0 comments

Checking User Permissions in MySQL

If you need to check what mysql users you currently have set, you can use the following code.

select * from mysql.user

This will list out all the users. Take note to what host they can access your database from. There may be multiple entries for the same user if you limit them to a certain host, like an ip address, or localhost.

To see the full permissions use the grant feature. Change localhost to an IP address if you filter by that.

SHOW GRANTS FOR ‘root’@’localhost’
If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Leave a Comment

Your email address will not be published. Required fields are marked *