Mysql – Permissions for a MySQL user which will monitor replication status

MySQLpermissionsreplication

I'd like to use a script to monitor the replication status of a MySQL database like in this bash script: https://gist.github.com/wesdeboer/1791632

I'd like to create a user which will only be used to query the status of the replication. So basically this user would just need to run the command:

"SHOW SLAVE STATUS \G"

What is the minimum set of permissions I need to grant a user to allow this?

(Is this even something which can be GRANTed?

Best Answer

According to the MySQL Documentation on SHOW SLAVE STATUS\G

Either SUPER or REPLICATION CLIENT should do it. I would go with the minimum:

GRANT REPLICATION CLIENT ON *.* to user@host;