• Skip to main content
  • Skip to primary sidebar
  • Home
  • WordPress
  • web Hosting
  • linux
  • mysql
  • nginx
  • apache2
  • devops

Raju Ginni

wordpress tutorials seo hosting etc

You are here: Home / tutorials / new relic mysql install integration – 2 ways fix problems

new relic mysql install integration – 2 ways fix problems

 

Installing Infrastructure agent required however, the guided install automatically installs the new relic ionfrastruc ture agent.

 

Table of Contents

Toggle
  • New relic mysql Guided Install
  • Copy & Paste mysql New relic installation Command
  • Step 2: Create mysql User & Grant Permissions
  • Step 3: Provide the mysql database details to new relic terminal
  • 2nd way New relic mysql Integration
    •  2.1 create mysql user and grant replication permissions
  • 2.2 install newrelic mysql agent
  • 2.3 Configure new relic mysql integrations
  • Restart new relic infrastructure agent
  • How to mysql data in new relic Dashboard
  • Problem new relic mysql integration

New relic mysql Guided Install

Createe New account with New relic, Click on settings and slect Add more data

Then select mysql.

 

Copy & Paste mysql New relic installation Command

 

curl -Ls https://raw.githubusercontent.com/newrelic/newrelic-cli/master/scripts/install.sh | bash && sudo NEW_RELIC_API_KEY=NRAK-Q8QNCMEW58VMJ2A5ORFQUWNOH9W NEW_RELIC_ACCOUNT_ID=3034122 /usr/local/bin/newrelic install -n mysql-open-source-integration

Step 2: Create mysql User & Grant Permissions

on installation  it asks run the below commands

to create a new user, use these commands as reference (Note: username,
  password, and similar user-specific values must be replaced):
   > sudo mysql -e “CREATE USER ‘newrelic’@’localhost’ IDENTIFIED BY ‘YOUR_SELECTED_PASSWORD’;”
  > sudo mysql -e “GRANT REPLICATION CLIENT ON *.* TO ‘newrelic’@’localhost’ WITH MAX_USER_CONNECTIONS 5;”
  > sudo mysql -e “GRANT SELECT ON *.* TO ‘newrelic’@’localhost’ WITH MAX_USER_CONNECTIONS 5;”

 

if you are stuck at Creating mysql user & permissions  check this tutorial.

ERROR 1141 (42000): There is no such grant defined for user ‘newrelic’ on host ‘%’

The above error may appears.

 

Step 3: Provide the mysql database details to new relic terminal

mysql user
password
host
port
database
if you enter correctly you will go to next step other iwse you get followin g error message.
mysql user has no access to the database.
If no error you get the
following message
Checking for data in New Relic (this may take a few minutes)…
WWWWWWW
if success you will see the data in new relic dashboard.
or else you get the following message.
task: Failed to run task “default”: task: Failed to run task “assert_pre_req”: exit status 2

2nd way New relic mysql Integration

 

first install new relic infrastructure agent

find the host integration name for mysql

ex: nri-mysql

 2.1 create mysql user and grant replication permissions

login to mysql root

mysql -u root -p

and run the following commands without erroors.

 CREATE USER ‘newrelic’@’localhost’ IDENTIFIED BY ‘YOUR_SELECTED_PASSWORD’;
  GRANT REPLICATION CLIENT ON *.* TO ‘newrelic’@’localhost’ WITH MAX_USER_CONNECTIONS 5;
 GRANT SELECT ON *.* TO ‘newrelic’@’localhost’ WITH MAX_USER_CONNECTIONS 5;

2.2 install newrelic mysql agent

sudo apt-get install nri-mysql

 

2.3 Configure new relic mysql integrations

cd /etc/newrelic-infra/integrations.d

cp newrelic-mysql.sample newrelic-mysql.yml

 

nano newrelic-mysql.yml

integration_name: com.newrelic.mysql

instances:
– name: mysql-status
command: status
arguments:
hostname: localhost
port: 3306
username: newrelic
password: your password

 

Below metric addeed if you succeed with auto guided install or you can manually configure it.
database: naukri
extended_metrics: true
extended_innodb_metrics: true
extended_myisam_metrics: true
remote_monitoring: true

Restart new relic infrastructure agent

sudo systemctl restart newrelic-infra

 

How to mysql data in new relic Dashboard

New Relic Home >> Infrastructure

> Third party service >>

There will be appear mysql or redisor any integrations.

 

Problem new relic mysql integration

Download the new relic diagnosis tool

on ubuntu linux and windows server.  and run this will diagnose the situation, take a screenshot and send it to the new relic support.

syslog errors

newrelic-infra-service[16510]: time=”2021-05-07T13:56:30Z” level=error msg=”Integration command failed” error=”exit status 1″ instance=mysql-status integration=com.newrelic.mysql prefix=config/mysql stderr=”[FATAL] can’t continue: error querying inventory: error executing `SHOW GLOBAL VARIABLES`: dial tcp 127.0.0.1:3306: connect: connection refused\n” working-dir=/var/db/newrelic-infra/newrelic-integrations.

here not listening on tcp but on unix socket

vi /etc/mysql/my.cnf

#bind-address = 127.0.0.1

OR
$ vi /etc/mysql/mysql.conf.d/mysqld.cnf

uncomment it.

Most problems you mY FACE WITH MYSQL Commands.

 

integration_name=nri-mysql stderr=”[FATAL] can’t continue: error querying inventory: error executing `SHOW GLOBAL VARIABLES`: Error 1045: Access denied for user ‘newrelic’@’127.0.0.1′ (using password: YES)”

 

newrelic’@’127.0.0.1′ vs newrelic’@’localhost’

change password in mysql

ALTER USER ‘newrelic’@’localhost’ IDENTIFIED BY ‘NewPassword’;

Primary Sidebar

tutorials

  • Core Java Tutorial Free online
  • HTML & CSS Tutorials
  • Php tutorials
  • ubuntu tutorials installation download issues etc
  • redis install ubuntu 20.04 with wordpress php redis mysql configuration
  • [INTRO] Ethical hacking / cyber Security / Penetration testing Tutorial -{updates frequently}
  • Android Studio tutorials syllabus Topics Course details #AndroidApplicationDevelopment
  • AUdio Editing Background Noise removal (Audacity, Adobe Premiere Addition, Camtasia Filmora Windows Obs)
  • what is vpn vs proxy vs tor, http vs https, http2, tcp vs udp, kali linux sql source code injection
  • how to create a website free of cost on google
  • CCNA Syllabus pdf (CCNA / CCNP vs devops vs mcsa /MCSE)
  • Redis performance metrics & tuning for nginx apache ubuntu & debian
  • xampp tutorials 2021 installation errors fix wordpress phpmyadmin mysql apache
  • new relic installation linux (infrastructure agent , php, mysql , nginx)
  • new relic mysql install integration - 2 ways fix problems
  • new relic php agent install in 3 steps
  • aws load balancer tutorial
  • git branches merge fetch pull conflicts

hi i am raju ginni, primalry i manage wordpress websites on GCP cloud platform as a cloud engineer, and create content on passionate things.
you can follow me on youtbe

© 2025 - All Rights Reserved Disclaimer & Privacy Policy