For users whose MySQL database collector will not start, first check the configuration data including username, password, host, and port.
Look in the Agent logs for an error similar to the following:
"Error collecting data for database 'xxx DB' java.sql.SQLException: Access denied for user 'root'@'hostname'"
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1075)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3566)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3498)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:919)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:4004)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1284)
To diagnose this issue, first validate the following:
mysql> select user, host from mysql.user where name = 'root';
Resolve the issue by either updating the collector configuration to match the MySQL command output from above, or create a new hostname that matches the collector configuration output and use this new hostname in the collector configuration.