MySql - Runs by has error "Unable to obtain a new database connection"

I have install the MySql Plugin with npi and it runs fine. But it does not appear in my dashboard.
So I checked daemon.log and find the following error “The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
[2015-01-14 16:50:09,922] ERROR com.newrelic.plugins.mysql.MySQL - Unable to obtain a new database connection: jdbc:mysql://localhost/ USER_NAME_HERE/PASSWORD_FILTERED, check your MySQL configuration settings. Communications link failure”

Our server is running at AWS and MySql as an instance on another server (Amazon RDS).

But for some reason it is trying to access MySql as localhost, but my plugin.json file was not configured to use localhost. Here is a copy of my configuration with our password removed.

  "agents": [
      "name"    : "zovue",
      "host"    : "",
      "metrics" : "status,newrelic",
      "user"    : "root",
      "passwd"  : "[Password was removed for POST]"

So, why is it still trying the use localhost to access MySql and is there any config file I need to configure?

Extra Information

Server: Ubuntu (64 bit)
Java: 1.7.0_65 (64bit)
MySql 5.6.19

Thanks in advance

Fixed. It turns out that I had to stop and restart the service.

Hi @pherniak,

Welcome to the forum!

Glad to hear you got this working.

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: | 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:// 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:// 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 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” : “”,
“metrics” : “status,newrelic”,
“user” : “newrelic”,
“passwd” : “*****”


Hi Rakesh, I got back to you over here: