Add user information to MySQL Python module documentation (#7128)
* add user details to MySQL py module doc * Update collectors/python.d.plugin/mysql/README.md Co-Authored-By: Joel Hans <joel.g.hans@gmail.com> * Grammar fixes Co-Authored-By: Joel Hans <joel.g.hans@gmail.com> * suggested changes Co-Authored-By: Joel Hans <joel.g.hans@gmail.com> * suggested changes Co-Authored-By: Joel Hans <joel.g.hans@gmail.com> * add mysql shell
Promise Akpan committed
Oct 24, 2019 at 17:05 UTC
a6229b245cf42b332d3f11199488f175a8a80a7c
1 file changed
+19
-4
collectors/python.d.plugin/mysql/README.md
+19
-4
@@ -5,8 +5,19 @@ Module monitors one or more mysql servers
5
**Requirements:**
6
7
- python library [MySQLdb](https://github.com/PyMySQL/mysqlclient-python) (faster) or [PyMySQL](https://github.com/PyMySQL/PyMySQL) (slower)
8
+- `netdata` local user to connect to the MySQL server.
9
9
-It will produce following charts (if data is available):
10
+To create the `netdata` user, execute the following in the MySQL shell:
11
+
12
+```sh
13
+create user 'netdata'@'localhost';
14
+grant usage on *.* to 'netdata'@'localhost';
15
+flush privileges;
16
+```
17
+The `netdata` user will have the ability to connect to the MySQL server on `localhost` without a password.
18
+It will only be able to gather MySQL statistics without being able to alter or affect MySQL operations in any way.
19
+
20
+This module will produce following charts (if data is available):
21
22
1. **Bandwidth** in kilobits/s
23
@@ -331,7 +342,8 @@ You can provide, per server, the following:
342
343
- key: the path name of the client private key file.
344
- cert: the path name of the client public key certificate file.
334
- - ca: the path name of the Certificate Authority (CA) certificate file. This option, if used, must specify the same certificate used by the server.
345
+ - ca: the path name of the Certificate Authority (CA) certificate file. This option, if used, must specify the
346
+ same certificate used by the server.
347
- capath: the path name of the directory that contains trusted SSL CA certificate files.
348
- cipher: the list of permitted ciphers for SSL encryption.
349
@@ -358,9 +370,12 @@ remote:
370
port : 9000
371
```
372
361
-If no configuration is given, module will attempt to connect to mysql server via unix socket at `/var/run/mysqld/mysqld.sock` without password and with username `root`
373
+If no configuration is given, the module will attempt to connect to MySQL server via a unix socket at
374
+`/var/run/mysqld/mysqld.sock` without password and with username `root`.
375
363
-`userstats` graph works only if you enable such plugin in MariaDB server and set proper mysql priviliges (SUPER or PROCESS). For more detail please check [MariaDB User Statistics page](https://mariadb.com/kb/en/library/user-statistics/)
376
+`userstats` graph works only if you enable the plugin in MariaDB server and set proper MySQL privileges (SUPER or
377
+PROCESS). For more details, please check the [MariaDB User Statistics
378
+page](https://mariadb.com/kb/en/library/user-statistics/)
379
380
---
381