Question

Needed Some help, I installed the newrelic mysql plugin, and created a user from script but when I start the agent using java -jar newrelic_mysql_plugin-1.2.0.jar it gives me

com.newrelic.metrics.publish.binding.Context | SEVERE | Unable to obtain a new database connection: jdbc:mysql://localhost:3306/ root/PASSWORD_FILTERED, check your MySQL configuration settings. Access denied for user 'root'@'127.0.0.1' (using password: YES)

I tried to use it using root credentials for mysql but same error. i can connect from localhost shell using root credentials. and my mysql.instance.json is:

[ { "name" : "MyApp", "host" : "localhost:3306", "metrics" : "status,newrelic", "user" : "root", "passwd" : "mypassword" }, ]

Reference for Plugin: http://newrelic.com/plugins/new-relic-inc/52

Was it helpful?

Solution

found the issue, the default script didn't create the user@'127.0.0.1' just created user@localhost. i created it manually and now its working like charm. just posting the issue hope it will help others.

You can see if user is created or not using

SELECT User FROM mysql.user;

Or to Create a User with limited rights in mysql shell just use.

CREATE USER newrelic@localhost IDENTIFIED BY 'yourpass';

GRANT PROCESS,REPLICATION CLIENT ON . TO newrelic@localhost;

CREATE USER newrelic@127.0.0.1 IDENTIFIED BY 'yourpass';

GRANT PROCESS,REPLICATION CLIENT ON . TO newrelic@127.0.0.1;

and Define your password in Clean test in mysql json.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top