MySQL NPI Plugin, "Unable to obtain a new database connection"

Hi
I’m trying to get the NPI plugin for MySQL to work but seems to be a bit harder then I expected. I’m getting the following error:

“[2014-10-16 17:33:40,580] ERROR com.newrelic.plugins.mysql.MySQL - Unable to obtain a new database connection: jdbc:mysql://127.0.0.1/ root/PASSWORD_FILTERED, check your MySQL configuration settings. Communications link failure”

java version “1.6.0_32” is installed, and I can connect to the database using mysql cli with the credentials added to the plugin.json configuration file.

What have I missed?

I got it to work, added bind-address and created a spearate newrelic user!

@gonace Thank you for updating us and letting us know what worked for you! Should be valuable to others who may experience the same problems in configuration.

Hi ,I am facing the same issue.
I have created user and granted permissions using the above queries. Installed mysql databasse in localhost (Windows 7 operating system)

below is the error log details
[2020-05-22 11:21:54,347] DEBUG com.newrelic.metrics.publish.Runner - Setting up agents to be run
[2020-05-22 11:21:54,379] DEBUG com.newrelic.plugins.mysql.instance.MySQLAgent - MySQL Agent initialized: name: Localhost | host: 127.0.0.1 | user: newrelic | properties: | metrics: [newrelic, status] |
[2020-05-22 11:21:54,379] DEBUG com.newrelic.metrics.publish.AgentFactory - Created agent: com.newrelic.plugins.mysql.instance.MySQLAgent@5e91993f
[2020-05-22 11:21:54,388] DEBUG com.newrelic.metrics.publish.Agent - Preparing to run
[2020-05-22 11:21:54,388] DEBUG com.newrelic.metrics.publish.Agent - Setting up metrics
[2020-05-22 11:21:54,397] DEBUG com.newrelic.metrics.publish.Runner - Harvest and report data
[2020-05-22 11:21:54,398] DEBUG com.newrelic.metrics.publish.Runner - Beginning poll cycle for agent: ‘Localhost’
[2020-05-22 11:21:54,399] DEBUG com.newrelic.plugins.mysql.MySQL - Getting new MySQL Connection: jdbc:mysql://127.0.0.1/ newrelic/PASSWORD_FILTERED
[2020-05-22 11:21:55,161] ERROR com.newrelic.plugins.mysql.MySQL - Unable to obtain a new database connection: jdbc:mysql://127.0.0.1/ newrelic/PASSWORD_FILTERED, check your MySQL configuration settings. Unable to load authentication plugin ‘caching_sha2_password’.
[2020-05-22 11:21:55,162] DEBUG com.newrelic.metrics.publish.Runner - Ending poll cycle for agent: ‘Localhost’
[2020-05-22 11:21:55,162] DEBUG com.newrelic.metrics.publish.binding.Request - No metrics were reported for this poll cycle

I have changed the host from localhost to 127.0.0.1 also but no luck. I have mysql database running in my localhost only in this case what host should be given
please suggest.

below is the plugin.json details:

“agents”: [
{
“name” : “localhost”,
“host” : “127.0.0.1”,
“metrics” : “status,newrelic”,
“user” : “newrelic”,
“passwd” : “*****”
}
]

Thanks,
Rakesh

Hi Rakesh, I got back to you over here:

1 Like