我正在使用一个简单的 mariadb 体系结构、一个接收所有请求的主 (server2) 和一个副本 (server1) 来测试 maxscale 解决方案。复制工作正常,但在主节点停止时,maxscale 报告了一个错误:
2021-08-23 14:36:08 notice : [mariadbmon] Selecting a server to promote and replace 'server2'. Candidates are: 'server1'.
2021-08-23 14:36:08 notice : [mariadbmon] Selected 'server1'.
2021-08-23 14:36:08 notice : [mariadbmon] Performing automatic failover to replace failed master 'server2'.
2021-08-23 14:36:08 error : [mariadbmon] Failed to stop slave connection on 'server1': Query 'SET STATEMENT max_statement_time=3 FOR STOP SLAVE '';' failed on 'server1': 'Access denied for user 'monitor_user'@'192.168.100.%' (using password: YES)' (1045).
2021-08-23 14:36:08 error : [mariadbmon] Failed to remove slave connection(s) from 'server1'.
2021-08-23 14:36:08 error : [mariadbmon] Failover 'server2' -> 'server1' failed.
根据maxscale github, monitor_user 的授权是:
> show grants for 'monitor_user'@'192.168.100.%'\G;
*************************** 1. row ***************************
Grants for monitor_user@192.168.100.%: GRANT RELOAD, SUPER, REPLICATION CLIENT ON *.* TO `monitor_user`@`192.168.100.%` IDENTIFIED BY PASSWORD '***'
SET 是否有特别补助金?我一定错过了什么……有什么想法吗?谢谢你。
2021 年 8 月 23 日星期一 15:19:20 UTC 编辑:
- Debian 破坏者 10.10
- 玛丽亚数据库 10.3
- 最大值 2.5.14