The following article shows what are the minimal privileges required for monitoring only. The follow functionality WILL NOT WORK with the minimal privileges:
- add node (granting is needed)
- create users from UI
- setup replication slave
Replace ADDRESS_OF_THE_CONTROLLER,CMON_PASSWORD, and ADDRESS_OF_THE_DATA_NODE.
mysql -ucmon -p -h<ADDRESS_OF_THE_DATA_NODE>
DELETE FROM mysql.user WHERE user='cmon' AND host='ADDRESS OF CONTROLLER';
FLUSH PRIVILEGES;
GRANT SUPER, SHOW DATABASES, REPLICATION CLIENT, PROCESS, SELECT, RELOAD ON *.* TO 'cmon'@'ADDRESS_OF_THE_CONTROLLER' IDENTIFIED BY 'CMON_PASSWORD';
#Restart cmon
service cmon restart
Comments
4 comments
Thanks for Sharing a wonderful content. It was very interesting. post regular updates.
Thank You soo Much! These SQL's help me a lot
Helpful breakdown! I faced issues with replication sync earlier due to limited GRANTs. After adjusting privileges and restarting
cmon, things stabilized. Clear and effective guide—thanks!Thanks for sharing this, This is really helpful for anyone wanting to set up monitoring without giving full administrative privileges. The breakdown of minimal GRANTs makes it clear which privileges are strictly needed for monitoring Galera, standard replication, or NDB clusters. I also appreciate the reminder that some functions like adding nodes or creating users still require additional privileges, which helps prevent accidental misconfigurations.
Please sign in to leave a comment.