Skip to content

Commit

Permalink
Add user information to MySQL Python module documentation (netdata#7128)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
prhomhyse authored and Saruspete committed May 21, 2020
1 parent 5d7e50b commit 8fbdabc
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions collectors/python.d.plugin/mysql/README.md
Expand Up @@ -5,8 +5,19 @@ Module monitors one or more mysql servers
**Requirements:**

- python library [MySQLdb](https://github.com/PyMySQL/mysqlclient-python) (faster) or [PyMySQL](https://github.com/PyMySQL/PyMySQL) (slower)
- `netdata` local user to connect to the MySQL server.

It will produce following charts (if data is available):
To create the `netdata` user, execute the following in the MySQL shell:

```sh
create user 'netdata'@'localhost';
grant usage on *.* to 'netdata'@'localhost';
flush privileges;
```
The `netdata` user will have the ability to connect to the MySQL server on `localhost` without a password.
It will only be able to gather MySQL statistics without being able to alter or affect MySQL operations in any way.

This module will produce following charts (if data is available):

1. **Bandwidth** in kilobits/s

Expand Down Expand Up @@ -331,7 +342,8 @@ You can provide, per server, the following:

- key: the path name of the client private key file.
- cert: the path name of the client public key certificate file.
- ca: the path name of the Certificate Authority (CA) certificate file. This option, if used, must specify the same certificate used by the server.
- ca: the path name of the Certificate Authority (CA) certificate file. This option, if used, must specify the
same certificate used by the server.
- capath: the path name of the directory that contains trusted SSL CA certificate files.
- cipher: the list of permitted ciphers for SSL encryption.

Expand All @@ -358,9 +370,12 @@ remote:
port : 9000
```

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`
If no configuration is given, the module will attempt to connect to MySQL server via a unix socket at
`/var/run/mysqld/mysqld.sock` without password and with username `root`.

`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/)
`userstats` graph works only if you enable the plugin in MariaDB server and set proper MySQL privileges (SUPER or
PROCESS). For more details, please check the [MariaDB User Statistics
page](https://mariadb.com/kb/en/library/user-statistics/)

---

Expand Down

0 comments on commit 8fbdabc

Please sign in to comment.