How Does eG Enterprise Monitor MySQL Cluster?

eG Enterprise uses a single eG external agent to monitor the target MySQL Cluster. The external agent can be deployed on any remote host in the environment.

Pre-requisites for Monitoring the MySQL Cluster

To run the MySQL tests, the eG agent should be configured with the credentials of a user who has server-wide process and select privileges. If such a user does not pre-exist, then, in the user table of the mysql database of the target MySQL server, you need to manually create a user account with the aforesaid privileges. To create and configure such a user, follow the procedure discussed below:

  1. To create a new user account, you must first connect to the primary instance of the MySQL cluster server as the MySQL root user. For that, first login to the MySQL Cluster host, and at the command prompt, issue the following command:

    mysql -u root 

    If you have assigned a password to the root account, you will also need to supply a - password or -p option, as shown below:

    mysql -u root -pegurkha

  2. After successfully logging into the primary instance of the MySQL Cluster server, issue the following statement to access the mysql cluster database, which holds the user table:

    use mysql

  3. Then, at the MySQL prompt, issue the following command to create a user:

    CREATE USER ‘<username>’@’<IP_address_of_eG_agent>’ IDENTIFIED BY ‘<password>’;

    GRANT PROCESS,SELECT ON . TO ‘<username>’@’<IP_address_of_eG_agent>’;

    For instance, to ensure that user john (with password john) is able to connect to the MySQL Cluster database server (being monitored) from the eG agent host,, the following command is to be issued:

    CREATE USER ‘john’@’’ IDENTIFIED BY ‘john’;



    The CREATE and GRANT commands are case-sensitive; therefore, take care while specifying the user name, password, and privileges.

    Only the IP address of the eG agent's host can be provided as part of the CREATE command's syntax; the host name of the eG agent cannot be provided instead.

  4. For the MySQL Replication Transactions test to run, the user configured for that tests should additionally possess the following privileges. To configure the above-mentioned user with the specific privileges, issue the commands given below:

    GRANT REPLICATION CLIENT on *.* to '<username>'@'<IP_address_of_eG_agent>';

    GRANT REPLICATION SLAVE on *.* to '<username>'@'<IP_address_of_eG_agent>';

  5. MySQL supports pluggable authentication, in which plugins are invoked to authenticate client connections. Authentication plugins enable the use of authentication methods other than the built-in method of passwords stored in the mysql.user system table.

    By default, when creating a new user account the built-in mysql_native_password authentication plugin is used, which performs authentication using the native password hashing method. In this case the user configured for the test can make use of the native password for establishing a connection with the target server.

    But, if you need to use caching_sha2_password as the authentication plugin, then the user can perform RSA key pair-based password exchange with the target server during the connection process. Then RSA public key is required for connecting with the server.

    To use the caching_sha2_password plugin for new user accounts, you can specify the caching_sha2_password plugin when creating new user accounts, as shown below:

    CREATE USER ‘<username>’@’<IP_address_of_eG_agent>’ IDENTIFIED WITH <authentication plugin> BY ‘<password>’

    For instance: CREATE USER ‘john’@’’ IDENTIFIED WITH caching_sha2_password BY ‘john’;

    For connections by accounts that authenticate with caching_sha2_password and RSA key pair-based password exchange, the server does not send the RSA public key to the user by default. User can use a client-side copy of the required public key, or request the public key from the server.

  6. Once the pre-requisites are set, manage the MySQL Cluster component in the eG administrative interface. The MySQL Cluster component should be added/managed in the eG administrative interface using its IP address only, and not its host name. Then, proceed to configure the tests. While doing so, remember to configure the user name and password parameters with the name and password (respectively) that corresponds to the eG agent’s IP address in the user table.