This repository has been archived by the owner on Apr 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 66
/
MYSQL.TXT
64 lines (51 loc) · 3.2 KB
/
MYSQL.TXT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Required MySQL User Account
===========================
The following SQL statements that are found in the mysql_user.sql file will create a default
New Relic MySQL user necessary to use for this plugin to retrieve MySQL metrics.
When deploying the MySQL plugin on the database server, the necessary privileges only require 'localhost' or '127.0.0.1' access.
CREATE USER newrelic@localhost IDENTIFIED BY PASSWORD '*B8B274C6AF8165B631B4B517BD0ED2694909F464';
GRANT PROCESS,REPLICATION CLIENT ON *.* TO newrelic@localhost;
CREATE USER [email protected] IDENTIFIED BY PASSWORD '*B8B274C6AF8165B631B4B517BD0ED2694909F464';
GRANT PROCESS,REPLICATION CLIENT ON *.* TO [email protected];
When deploying the MySQL plugin on a common server, i.e. this server will connect one or more MySQL servers over the
network, a necessary change to the SQL statements is required to grant privileges to the applicable host or host mask,
i.e. changing the value of "localhost" in the 2 SQL statements appropriately, e.g. to "10.%" if your deployed server
runs within this IP range.
A hashed password can be created using the PASSWORD() function. From the MySQL docs:
mysql> SELECT PASSWORD('mypass');
+-------------------------------------------+
| PASSWORD('mypass') |
+-------------------------------------------+
| *6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4 |
+-------------------------------------------+
Customizing the MySQL User Account
----------------------------------
You can use any existing MySQL user account providing the user has the applicable privileges listed above.
You can override all necessary MySQL account details in the MySQL JSON configuration file. The following is an
example syntax of all configurable settings:
[
{
"name" : "Prod Server 1",
"host" : "proddb.example.com:3306",
"user" : "newrelic",
"passwd" : "USER_CLEAR_TEXT_PASSWORD_HERE",
"properties" : "?profileSQL=true",
"metrics" : "status,newrelic,slave"
}
]
These options are:
* name - This is a meaningful name for the MySQL server that will show up in the New Relic Dashboard.
* host - This is the hostname of the MySQL server. If necessary a port can be specified. 3306 is the default
and is not required to be stated.
* user - This is the MySQL user account.
* passwd - This is the clear text password for the MySQL user account.
* properties - This is additional Connector/J properties that can be passed to the database connections. This
option is generally left blank. This is an advanced feature.
* metrics - This is the list of metric categories that can be collected by New Relic. The currently accepted
values are: status,master,slave,newrelic. Additional categories can be defined. See CATEGORIES.TXT
for more information.
Known Issues
------------
* If you are using MySQL 5.1.23 or older you will need to add the SUPER privilege to collect SHOW ENGINE INNODB STATUS.
* While all SQL metric commands should run with MySQL 5.0 and 5.1, due to the end of life policy of these versions,
testing has only been performed with MySQL 5.5 and MySQL 5.6/