Preparing MySQL for monitoring

In Redgate Monitor, supported versions of MySQL servers can be found here.

For Linux, supported versions can be found here.

Setting up a MySQL User 

In the following commands replace: 

  • <password> with the password for the user being created
CREATE USER 'redgatemonitor'@'<host>' IDENTIFIED BY '<password>'; 

GRANT SELECT ON *.* TO redgatemonitor; 

GRANT PROCESS ON *.* TO redgatemonitor; 

GRANT CREATE TEMPORARY TABLES ON *.* TO redgatemonitor; 
CREATE USER 'redgatemonitor'@'<host>' IDENTIFIED BY '<password>'; 

GRANT SELECT ON *.* TO 'redgatemonitor'@'<host>'; 

GRANT PROCESS ON *.* TO 'redgatemonitor'@'<host>' WITH GRANT OPTION; 

GRANT CREATE TEMPORARY TABLES ON *.* TO 'redgatemonitor'@'<host>'; 

Configuring MySQL Instances

You will need to connect to the MySQL instance and create a database which Redgate Monitor can use to create temporary tables within:

CREATE DATABASE IF NOT EXISTS redgatemonitor_db;

Configuring MySQL Instances to track statement execution CPU time 

Make sure that events_statements_cpu is enabled by running following command 

SELECT * 
FROM performance_schema.setup_consumers 
WHERE NAME LIKE '%statements%'; 

If the ENABLED column is set to NO, please run the following: 

UPDATE performance_schema.setup_consumers 
SET ENABLED = 'YES' 
WHERE NAME = 'events_statements_cpu'; 


By default, performance_schema is disabled in Amazon RDS for MySQL.

You will need to enable it by modifying your RDS parameter group, as system variables in RDS cannot be directly changed with SET statements.

Step 1: Create a Custom Parameter Group

Amazon RDS does not allow modifying performance_schema directly on the instance, so you must create a custom DB parameter group.

  1. Sign in to AWS Management Console and go to RDS.
  2. In the left menu, click Parameter groups.
  3. Click Create parameter group.
  4. Choose:
    • Parameter group family: Select the correct MySQL version (e.g., mysql8.0).
    • Type: Select DB Parameter Group.
    • Name: Enter a descriptive name, e.g., mysql-custom-params.
    • Description: (Optional) Add a description.
  5. Click Create.

Step 2: Modify the Parameter Group

  1. Find your newly created DB parameter group and click on it.
  2. Search for performance_schema.
  3. Change its value from 0 to 1.
  4. Click Save changes.

Step 3: Apply the Custom Parameter Group to Your RDS Instance

  1. Go to RDSDatabases.
  2. Select your MySQL RDS instance.
  3. Click Modify.
  4. Scroll down to DB parameter group and select the custom parameter group you created.
  5. Click Continue.
  6. Select Apply Immediately (or apply it during the next maintenance window).
  7. Click Modify DB Instance.

Step 4: Reboot the RDS Instance

The changes won’t take effect until you reboot:

  1. Go to RDSDatabases.
  2. Select your MySQL instance.
  3. Click ActionsReboot.
  4. Confirm the reboot.

Didn't find what you were looking for?