Symptoms of objects in the sys schema not being selected in AWS RDS MySQL

Description

Symptom: When connecting to the DB through the data source in AWS RDS MySQL with pmm, an error occurs when searching for the sys. schema object.

 

How to test

RDS , PMM version and Registration Process

AWS RDS MySQL and PMM version
-> AWS RDS MySQL : 8.0.32
-> PMM : 2.40.1

How you are adding RDS instance to PMM monitoring.

  1. Create an IAM account that can access RDS

  2. Enable enhanced monitoring

  3. Create DB user for pmm

CREATE USER 'pmm'@'%' IDENTIFIED BY password;
GRANT SELECT, PROCESS, REPLICATION CLIENT ON . TO 'pmm'@'%';
ALTER USER 'pmm'@'%' WITH MAX_USER_CONNECTIONS 10;
GRANT SELECT, UPDATE, DELETE, DROP ON performance_schema.* TO 'pmm'@'%'

  1. Add an RDS instance
    Enter the RDS access key and RDS secret key
    When I enter, a list of RDSs that can be accessed by the iam user is checked and selected.

  2. Create a data source

How to document

None

Attachments

3

Activity

Show:

wanskim September 2, 2024 at 4:04 AM

Thank you for your support.
We created a separate mysql user for pmm as pmm@'%' and granted it permission.
As a result of testing, we confirmed that the sys. table was normally queried
when the permission was granted as shown below. (Execute permission missing)

GRANT SELECT, PROCESS, REPLICATION CLIENT ON . TO pmm@%
GRANT SELECT, EXECUTE ON sys.* TO pmm@%
GRANT SELECT, UPDATE, DELETE, DROP ON performance_schema.* TO pmm@%

Thank you.

Aaditya Dubey August 30, 2024 at 11:32 AM
Edited

Hi

I’m able to reproduce the issue and found out that the user you are using lacks the privileges, so to access the sys, we need the privileges mentioned here.

I tested with Admin user and it works perfectly fine. Please check the attached screenshots.

Here are the admin privileges for your reference:

Aaditya Dubey August 30, 2024 at 9:46 AM

Hi

Thank you for the report.
Could you please explain how to create a data source?
Attaching an image, please let me know the steps you performed for data source creation.

Not a Bug

Details

Assignee

Reporter

Priority

Labels

Needs QA

Yes

Needs Doc

Yes

Affects versions

Smart Checklist

Created August 30, 2024 at 1:21 AM
Updated September 2, 2024 at 4:04 AM
Resolved August 30, 2024 at 11:32 AM