January 6, 2016

Add Read-Only MySQL User

We had a client requesting read-only access to their MySQL databases today, I thought it would be useful to log the command to create the user with select privileges on all databases.

grant select on database_name.* to 'read-only_user_name'@'%' identified by 'password';

This will create the user also, you won’t need to use create user.

Leave a Reply

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