X
    Categories: MySQL

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.

Ed:

This website uses cookies.