Extensions
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MySQL Extension Requirements Removed

NicoleMT
Organizer

 

Hello, on November 17 I configured a MySQL extension, and at that time the documentation listed the following requirements:

Requirements for the MySQL extension
MySQL user with native authentication

Create user:

 

 
CREATE USER 'dynatrace'@'%' IDENTIFIED WITH mysql_native_password BY 'password';

 

 

Grant permissions:

 

 
GRANT SELECT ON performance_schema.* TO 'dynatrace'@'%'; GRANT PROCESS ON *.* TO 'dynatrace'@'%'; GRANT SHOW DATABASES ON *.* TO 'dynatrace'@'%'; GRANT SELECT ON mysql.slow_log TO 'dynatrace'@'%'; GRANT SELECT ON sys.x$memory_global_by_current_bytes TO 'dynatrace'@'%';

 

 

Note: To obtain database sizes, SELECT must be granted on each individual database.

CPU Metrics

 

 
SET GLOBAL innodb_monitor_enable='cpu%';

 

 

Top Slow Queries
Enable slow logging to table:

 

 
SET GLOBAL log_output = 'TABLE'; SET GLOBAL slow_query_log = 'ON'; SET GLOBAL long_query_time = 2;

 

 

Enable statement instruments and consumers:

 

 
UPDATE performance_schema.setup_instruments SET ENABLED = 'YES', TIMED = 'YES' WHERE NAME LIKE 'statement/%'; UPDATE performance_schema.setup_consumers SET ENABLED = 'YES' WHERE NAME IN ('events_statements_history', 'events_statements_summary_by_digest');

 

 

Execution Plan

Create procedure:

 

 
CREATE SCHEMA IF NOT EXISTS dynatrace; DELIMITER $$ CREATE PROCEDURE dynatrace.dynatrace_execution_plan(IN query TEXT) SQL SECURITY DEFINER BEGIN SET @explain := CONCAT('EXPLAIN FORMAT=JSON ', query); PREPARE stmt FROM @explain; EXECUTE stmt; DEALLOCATE PREPARE stmt; END $$ DELIMITER ;

 

 

Grant permission:

 

 
GRANT EXECUTE ON PROCEDURE dynatrace.dynatrace_execution_plan TO 'dynatrace'@'%';
 

Now this information no longer appears in the extension documentation.

I would like to know whether these requirements are still needed and if they have any impact on the database. We also want to see execution plans and slow queries, but this information is still not displayed by the extension.

Any guidance or updates on the current requirements for the extension would be appreciated.

1 REPLY 1

JamesKitson
Dynatrace Guru
Dynatrace Guru

Recently, all of the 'documentation' portions of the Hub tiles was moved to docs.dynatrace.com from the Hub tiles. The Hub tiles still have the releases/release notes but you'll see the details such as this in the docs now. There is a link to 'Documentation' on the Hub tile that will take you to the appropriate page.

 

For MySQL it is here: https://docs.dynatrace.com/docs/observe/applications-and-microservices/databases/extensions/mysql-re...

Featured Posts