On RDS, this setting doesn't persist across restarts. Grant the monitoring user UPDATE privileges on performance_schema.setup_consumers so the collector can re-enable it automatically.
Symptoms:mysql.query_plan is empty for some queries, particularly longer ones.
Cause: Statement text is truncated by MySQL's digest length limits, causing the receiver to skip EXPLAIN.
Symptoms: No query plans available in db.server.top_query events.
Cause: Expected behavior — query_sample_text doesn't exist on MySQL 5.7.x or 8.0.0–8.0.2.
Solutions: Upgrade to MySQL 8.0.3 or later for query plan support.
Symptoms: Query plans missing for UPDATE, INSERT, DELETE, or REPLACE statements.
Cause: Monitoring user lacks DML privileges and explain_mode is set to inline.
Solution:
Switch to procedure mode in your receiver configuration:
nrmysql:
explain_mode: procedure
This uses a SQL SECURITY DEFINER procedure to explain write statements without granting DML privileges to the monitoring user.
Symptoms: The mysql.session.client_name attribute is empty for some database connections.
Cause: Not a bug — some client drivers don't send connect attributes by default.
Notes:
This is data-dependent behavior
Different MySQL client libraries have varying support for connection attributes
Not all applications configure their drivers to send this information
Symptoms: APM correlation tags are not being extracted from SQL comments.
Cause: Comment tag extraction is not configured.
Solution:
Add allowed_comment_keys to both collection blocks in your configuration:
query_sample_collection:
allowed_comment_keys:[nr_service_guid]
top_query_collection:
allowed_comment_keys:[nr_service_guid]
Comment tag extraction is empty by default for security reasons.
Symptoms:
MySQL entity missing from Entity Explorer
APM application doesn't show database relationships
Cause: Missing server.address and server.port resource attributes required for entity synthesis.
Solution:
Add a resource processor to your collector configuration:
processors:
resource/mysql:
attributes:
-key: server.address
value:"<YOUR_DB_HOST>"
action: upsert
-key: server.port
value: <YOUR_DB_PORT>
action: upsert
service:
pipelines:
metrics:
receivers:[nrmysql]
processors:[resource/mysql, batch]
exporters:[otlp/newrelic]
logs:
receivers:[nrmysql]
processors:[resource/mysql, batch]
exporters:[otlp/newrelic]
Symptoms:
"Connection refused" errors
"Access denied" authentication failures
Solutions:
For connection refused:
Verify MySQL is running:
bash
$
systemctl status mysql
Check firewall rules allow connections on MySQL port (default 3306)
Verify bind-address in MySQL configuration allows external connections
For authentication errors:
Verify user exists and has correct privileges:
SELECTUser, Host FROM mysql.userWHEREUser='<YOUR_DB_USERNAME>';
SHOW GRANTS FOR'<YOUR_DB_USERNAME>'@'%';
Check password is correct
For RDS, ensure security group allows inbound connections
RDS Performance Schema consumer resets:
The events_waits_current consumer automatically disables on RDS restart/failover. Grant UPDATE privileges on performance_schema.setup_consumers so the collector can re-enable it:
RDS network security:
Ensure your RDS security group allows inbound traffic on port 3306 from the NRDOT Collector's IP address or security group.
Symptoms: The collector fails to connect, with a certificate or TLS-related error.
Cause: RDS enforces TLS. The collector doesn't trust Amazon's RDS CA by default.
Solution:
Set tls.ca_file (or tls.ca_pem) to the Amazon RDS certificate bundle, and leave tls.insecure/tls.insecure_skip_verify at false:
nrmysql:
tls:
insecure:false
insecure_skip_verify:false
ca_file: /path/to/global-bundle.pem
NRQL query examples
Use these NRQL queries to troubleshoot and verify your MySQL monitoring:
Check for blocked queries
FROM Log SELECT*WHERE event.name ='db.server.query_sample'
AND mysql.blocking.blocker.count >0
SINCE 1hour ago
Tip
Filter with mysql.blocking.blocker.count > 0, not != 0 — in NRQL, null != 0 evaluates to TRUE, which would silently include non-blocked sessions in your results.