When adding a new MySQL monitor, i get a message "The MySQL Server is not accessible from the Applications Manager Server host. Kindly add permissions ..."

When adding a new MySQL monitor, i get a message "The MySQL Server is not accessible from the Applications Manager Server host. Kindly add permissions ..."

Reason:

This error occurs because the MySQL user account provided for monitoring does not have the necessary privileges to connect from the specific IP address or hostname where the Applications Manager server is installed.

Solution:

A relevant user who has the above privileges should be set. To provide permission for a specific user (of the host where Applications Manager is running) to access the MySQL server, follow the steps given below.
  • In the host where the MySQL (which you are trying to monitor) is running, connect as a root user.
  • Execute the following commands.

If MySQL version is 8.0 and above:

To create a new user in MySQL database server:
  1. USE mysql;
  2. CREATE USER '<user>'@'<host>' IDENTIFIED BY '<password>';
Granting required privileges to a database user for monitoring:
  1. GRANT SELECT,SHOW DATABASES,REPLICATION CLIENT,REPLICATION SLAVE ON *.* TO '<user>'@'<host>';
  2. FLUSH PRIVILEGES;
Notes
Notes:
Replace <user> with the MySQL username used for monitoring.
Replace <host> with the IP address or hostname of the server where Applications Manager is installed.
Replace <password> with the password for that specific MySQL user.

If MySQL version is 5.7

To create a new user in MySQL database server:
  1. USE mysql;
  2. CREATE USER <user>@'<host>' IDENTIFIED BY '<password>';
Granting required privileges to a database user for monitoring:
  1. GRANT SELECT,SHOW DATABASES,REPLICATION CLIENT,REPLICATION SLAVE ON *.* TO '<user>'@'<host>';
  2. FLUSH PRIVILEGES; 

If MySQL version is below 5.7

To create a new user in MySQL database server:
  1. USE mysql;
  2. INSERT INTO user (Host,User) VALUES('<host>','<user>');
Granting required privileges to a database user for monitoring:
  1. GRANT SELECT,SHOW DATABASES,REPLICATION CLIENT,REPLICATION SLAVE ON *.* TO '<user>'@'<host>';
  2. FLUSH PRIVILEGES; 

Alert
Note: 
If the error persist despite implementing the above changes, please run the MySQLDebug script by following the steps outlined in this KB article and provide the output to our support team for further assistance.