Update MySQL monitor user privileges for ProxySQL monitoring

The MySQL monitor user privileges were updated to include
the REPLICATION CLIENT privilege in addition to USAGE in
order to align with ProxySQL documentation [1].
This change ensures that the monitor user can check replication
lag, as previously only the USAGE privilege was granted,
which was sufficient for basic connection and read-only
checks but not for replication monitoring.

[1] https://proxysql.com/documentation/backend-monitoring/

Change-Id: I4172cf1d49e9f988cbf2bbe3c3f6835f0de4944d
This commit is contained in:
Michal Arbet 2024-10-01 08:21:23 +02:00
parent 50cc656d60
commit 0f20afcf45
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@
name: "{{ mariadb_monitor_user }}" name: "{{ mariadb_monitor_user }}"
password: "{% if enable_proxysql | bool %}{{ mariadb_monitor_password }}{% endif %}" password: "{% if enable_proxysql | bool %}{{ mariadb_monitor_password }}{% endif %}"
host: "%" host: "%"
priv: "*.*:USAGE" priv: "*.*:USAGE,REPLICATION CLIENT"
tags: always tags: always
with_dict: "{{ mariadb_shards_info.shards }}" with_dict: "{{ mariadb_shards_info.shards }}"
loop_control: loop_control:

View File

@ -29,7 +29,7 @@
name: "{{ mariadb_monitor_user }}" name: "{{ mariadb_monitor_user }}"
password: "{% if enable_proxysql | bool %}{{ mariadb_monitor_password }}{% endif %}" password: "{% if enable_proxysql | bool %}{{ mariadb_monitor_password }}{% endif %}"
host: "%" host: "%"
priv: "*.*:USAGE" priv: "*.*:USAGE,REPLICATION CLIENT"
when: when:
- inventory_hostname == groups[mariadb_shard_group][0] - inventory_hostname == groups[mariadb_shard_group][0]