docs(go.d/mysql): add MariaDB 10.5.9+ SLAVE MONITOR privilege (#20782)
Ilya Mashchenko committed
Aug 9, 2025 at 00:52 UTC
e33ba2f2bf02fbfa6c2ba32354f27c2075b677d6
1 file changed
+23
-12
src/go/plugin/go.d/collector/mysql/metadata.yaml
+23
-12
@@ -65,23 +65,34 @@ modules:
65
list:
66
- title: Create netdata user
67
description: |
68
- A user account should have the
69
- following [permissions](https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html):
68
+ A user account should have the following [permissions](https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html):
69
70
- [`USAGE`](https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html#priv_usage)
71
- [`REPLICATION CLIENT`](https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html#priv_replication-client)
72
- [`PROCESS`](https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html#priv_process)
74
-
73
+
74
To create the `netdata` user with these permissions, execute the following in the MySQL shell:
76
-
77
- ```mysql
78
- CREATE USER 'netdata'@'localhost';
79
- GRANT USAGE, REPLICATION CLIENT, PROCESS ON *.* TO 'netdata'@'localhost';
80
- FLUSH PRIVILEGES;
81
- ```
82
-
83
- The `netdata` user will have the ability to connect to the MySQL server on localhost without a password. It will only
84
- be able to gather statistics without being able to alter or affect operations in any way.
75
+
76
+ - **MySQL and MariaDB < 10.5.9**
77
+
78
+ ```mysql
79
+ CREATE USER 'netdata'@'localhost';
80
+ GRANT USAGE, REPLICATION CLIENT, PROCESS ON *.* TO 'netdata'@'localhost';
81
+ FLUSH PRIVILEGES;
82
+ ```
83
+
84
+ - **MariaDB >= 10.5.9**
85
+
86
+ For MariaDB 10.5.9 and later, use the `SLAVE MONITOR` privilege instead of `REPLICATION CLIENT`:
87
+
88
+ ```mysql
89
+ CREATE USER 'netdata'@'localhost';
90
+ GRANT USAGE, SLAVE MONITOR, PROCESS ON *.* TO 'netdata'@'localhost';
91
+ FLUSH PRIVILEGES;
92
+ ```
93
+
94
+ The `netdata` user will have the ability to connect to the MySQL server on localhost without a password.
95
+ It will only be able to gather statistics without being able to alter or affect operations in any way.
96
configuration:
97
file:
98
name: go.d/mysql.conf