patternsqlModerate
Permissions for a MySQL user which will monitor replication status?
Viewed 0 times
permissionsuserstatusreplicationmysqlwillformonitorwhich
Problem
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:
What is the minimum set of permissions I need to grant a user to allow this?
(Is this even something which can be
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?Solution
According to the MySQL Documentation on SHOW SLAVE STATUS\G
Either SUPER or REPLICATION CLIENT should do it. I would go with the minimum:
Either SUPER or REPLICATION CLIENT should do it. I would go with the minimum:
GRANT REPLICATION CLIENT ON *.* to user@host;Code Snippets
GRANT REPLICATION CLIENT ON *.* to user@host;Context
StackExchange Database Administrators Q#36299, answer score: 19
Revisions (0)
No revisions yet.