]> arthur.barton.de Git - netdata.git/blobdiff - conf.d/python.d/mysql.conf
dns_query_time plugin: replace "." with "_" in dimensions
[netdata.git] / conf.d / python.d / mysql.conf
index 8fbbe6513ef3870a27fc6ee5a644d27787c5a43f..63d635174a026b4943b78d1f7a42a3fc0bbfca01 100644 (file)
 #     pass: 'password'       # the mysql password to use
 #
 
+# ----------------------------------------------------------------------
+# 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,9 +111,15 @@ 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     : ''
@@ -146,9 +173,15 @@ 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     : ''
@@ -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'
+