@cryptotaxi247 / netdata-1 / commits / 51edc7d16

docs(go.d/mysql): add User Statistics prerequisite for per-user metrics (#21814)

Ilya Mashchenko committed Feb 25, 2026 at 14:26 UTC 51edc7d16da350b49d780a360d6334b76dac35e5
1 file changed +20 -1
src/go/plugin/go.d/collector/mysql/metadata.yaml
+20 -1
@@ -93,8 +93,27 @@ modules:
93 FLUSH PRIVILEGES;
94 ```
95
96 - The `netdata` user will have the ability to connect to the MySQL server on localhost without a password.
96 + The `netdata` user will have the ability to connect to the MySQL server on localhost without a password.
97 It will only be able to gather statistics without being able to alter or affect operations in any way.
98 + - title: Enable User Statistics (optional)
99 + description: |
100 + To collect per-user statistics, the [User Statistics](https://mariadb.com/docs/server/ha-and-performance/optimization-and-tuning/query-optimizations/statistics-for-optimizing-queries/user-statistics) plugin must be enabled.
101 + This is available for **MariaDB** and **Percona**, not for MySQL.
102 +
103 + By default, statistics are not collected. To enable the plugin, set the `userstat` system variable.
104 +
105 + - **In a configuration file** (persistent, requires restart):
106 +
107 + ```ini
108 + [mariadb]
109 + userstat = 1
110 + ```
111 +
112 + - **Dynamically** (takes effect immediately, does not persist across restarts):
113 +
114 + ```mysql
115 + SET GLOBAL userstat=1;
116 + ```
117 configuration:
118 file:
119 name: go.d/mysql.conf