summaryrefslogtreecommitdiffstats
path: root/conf.d/python.d/mysql.conf
diff options
context:
space:
mode:
Diffstat (limited to 'conf.d/python.d/mysql.conf')
-rw-r--r--conf.d/python.d/mysql.conf97
1 files changed, 95 insertions, 2 deletions
diff --git a/conf.d/python.d/mysql.conf b/conf.d/python.d/mysql.conf
index 8fbbe651..63d63517 100644
--- a/conf.d/python.d/mysql.conf
+++ b/conf.d/python.d/mysql.conf
@@ -69,6 +69,23 @@
#
# ----------------------------------------------------------------------
+# mySQL CONFIGURATION
+#
+# netdata does not need any privilege - only the ability to connect
+# to the mysql server (netdata will not be able to see any data).
+#
+# Execute these commands to give the local user 'netdata' the ability
+# to connect to the mysql server on localhost, without a password:
+#
+# > create user 'netdata'@'localhost';
+# > grant usage on *.* to 'netdata'@'localhost' with grant option;
+# > flush privileges;
+#
+# with the above statements, netdata will be able to gather mysql
+# statistics, without the ability to see or alter any data or affect
+# mysql operation in any way. No change is required below.
+
+# ----------------------------------------------------------------------
# AUTO-DETECTION JOBS
# only one of them will run (they have the same name)
@@ -80,6 +97,10 @@ mycnf2:
name : 'local'
'my.cnf' : '/etc/mysql/my.cnf'
+debiancnf:
+ name : 'local'
+ 'my.cnf' : '/etc/mysql/debian.cnf'
+
socket1:
name : 'local'
# user : ''
@@ -90,12 +111,18 @@ socket2:
name : 'local'
# user : ''
# pass : ''
- socket : '/var/lib/mysql/mysql.sock'
+ socket : '/var/run/mysqld/mysql.sock'
socket3:
name : 'local'
# user : ''
# pass : ''
+ socket : '/var/lib/mysql/mysql.sock'
+
+socket4:
+ name : 'local'
+ # user : ''
+ # pass : ''
socket : '/tmp/mysql.sock'
tcp:
@@ -146,12 +173,18 @@ socket2_root:
name : 'local'
user : 'root'
# pass : ''
- socket : '/var/lib/mysql/mysql.sock'
+ socket : '/var/run/mysqld/mysql.sock'
socket3_root:
name : 'local'
user : 'root'
# pass : ''
+ socket : '/var/lib/mysql/mysql.sock'
+
+socket4_root:
+ name : 'local'
+ user : 'root'
+ # pass : ''
socket : '/tmp/mysql.sock'
tcp_root:
@@ -177,3 +210,63 @@ tcpipv6_root:
host : '::1'
port : '3306'
+
+# Now we try the same as above with user: netdata
+
+mycnf1_netdata:
+ name : 'local'
+ user : 'netdata'
+ 'my.cnf' : '/etc/my.cnf'
+
+mycnf2_netdata:
+ name : 'local'
+ user : 'netdata'
+ 'my.cnf' : '/etc/mysql/my.cnf'
+
+socket1_netdata:
+ name : 'local'
+ user : 'netdata'
+ # pass : ''
+ socket : '/var/run/mysqld/mysqld.sock'
+
+socket2_netdata:
+ name : 'local'
+ user : 'netdata'
+ # pass : ''
+ socket : '/var/run/mysqld/mysql.sock'
+
+socket3_netdata:
+ name : 'local'
+ user : 'netdata'
+ # pass : ''
+ socket : '/var/lib/mysql/mysql.sock'
+
+socket4_netdata:
+ name : 'local'
+ user : 'netdata'
+ # pass : ''
+ socket : '/tmp/mysql.sock'
+
+tcp_netdata:
+ name : 'local'
+ user : 'netdata'
+ # pass : ''
+ host : 'localhost'
+ port : '3306'
+ # keep in mind port might be ignored by mysql, if host = 'localhost'
+ # http://serverfault.com/questions/337818/how-to-force-mysql-to-connect-by-tcp-instead-of-a-unix-socket/337844#337844
+
+tcpipv4_netdata:
+ name : 'local'
+ user : 'netdata'
+ # pass : ''
+ host : '127.0.0.1'
+ port : '3306'
+
+tcpipv6_netdata:
+ name : 'local'
+ user : 'netdata'
+ # pass : ''
+ host : '::1'
+ port : '3306'
+