你好, 我部署了3台mgr的集群和1台proxysql做代理节点,部署完proxysql,读操作能正常实现自动轮询, Admin>select hostgroup_id,hostname,port,status from runtime_mysql_servers; +--------------+----------------+------+--------+ | hostgroup_id | hostname | port | status | +--------------+----------------+------+--------+ | 10 | 192.168.209.26 | 3306 | ONLINE | | 30 | 192.168.209.26 | 3306 | ONLINE | | 30 | 192.168.209.27 | 3306 | ONLINE | | 30 | 192.168.209.29 | 3306 | ONLINE | +--------------+----------------+------+--------+ Admin>select * from monitor.mysql_server_connect_log; +----------------+------+------------------+-------------------------+---------------+ | hostname | port | time_start_us | connect_success_time_us | connect_error | +----------------+------+------------------+-------------------------+---------------+ | 192.168.209.29 | 3306 | 1702221005738355 | 1416 | NULL | | 192.168.209.27 | 3306 | 1702221006526338 | 1089 | NULL | | 192.168.209.26 | 3306 | 1702221007314330 | 596 | NULL | | 192.168.209.29 | 3306 | 1702221065738730 | 994 | NULL | | 192.168.209.27 | 3306 | 1702221066161317 | 992 | NULL | | 192.168.209.26 | 3306 | 1702221486958648 | 539 | NULL | | 192.168.209.29 | 3306 | 1702221545742088 | 1037 | NULL | | 192.168.209.26 | 3306 | 1702221546167397 | 590 | NULL | | 192.168.209.27 | 3306 | 1702221546592785 | 1394 | NULL | +----------------+------+------------------+-------------------------+---------------+ 30 rows in set (0.00 sec) Admin>select * from mysql_server_ping_log limit 10; +----------------+------+------------------+----------------------+------------+ | hostname | port | time_start_us | ping_success_time_us | ping_error | +----------------+------+------------------+----------------------+------------+ | 192.168.209.29 | 3306 | 1702221015728400 | 229 | NULL | | 192.168.209.26 | 3306 | 1702221015820460 | 107 | NULL | | 192.168.209.27 | 3306 | 1702221015912469 | 222 | NULL | | 192.168.209.27 | 3306 | 1702221025728898 | 283 | NULL | | 192.168.209.29 | 3306 | 1702221025854012 | 242 | NULL | | 192.168.209.26 | 3306 | 1702221025979120 | 103 | NULL | | 192.168.209.29 | 3306 | 1702221035729246 | 253 | NULL | | 192.168.209.27 | 3306 | 1702221035802663 | 288 | NULL | | 192.168.209.26 | 3306 | 1702221035876052 | 94 | NULL | | 192.168.209.26 | 3306 | 1702221045729747 | 104 | NULL | +----------------+------+------------------+----------------------+------------+ 10 rows in set (0.00 sec) Admin>select rule_id,active,match_digest,destination_hostgroup,apply from mysql_query_rules; +---------+--------+----------------------+-----------------------+-------+ | rule_id | active | match_digest | destination_hostgroup | apply | +---------+--------+----------------------+-----------------------+-------+ | 1 | 1 | ^SELECT.*FOR UPDATES | 10 | 1 | | 2 | 1 | ^SELECT | 20 | 1 | | 3 | 1 | ^SHOW | 20 | 1 | +---------+--------+----------------------+-----------------------+-------+ 3 rows in set (0.00 sec) 问题: 写操作只能对开始部署的primary节点,当primary节点192.168.209.26转移到192.168.209.27或192.168.209.29,写操作依然轮至192.168.209.26,不能自动转移到其它primary节点。 |
szhjb88
2023-12-10 23:27:52
| ||
szhjb88
2023-12-11 11:06:24
| ||
szhjb88
2023-12-11 15:47:27
| ||
szhjb88
2023-12-11 15:49:27
| ||
szhjb88
2023-12-12 15:26:24
| ||
合作电话:010-64087828
社区邮箱:greatsql@greatdb.com