Percona XtraDB Cluster更改默认端口不生效

操作系统版本:RHEL6.8
数据库版本:Percona-XtraDB-Cluster-5.7.21
问题:PXC按官网文档更改默认端口,重启服务还是侦听4567端口。为什么呢?
 
以下是官网链接和设置
https://www.percona.com/doc/percona-xtradb-cluster/LATEST/faq.html
 
What TCP ports are used by Percona XtraDB Cluster?

You may need to open up to four ports if you are using a firewall:
Regular MySQL port (default is 3306).
Port for group communication (default is 4567). It can be changed using the following option:
wsrep_provider_options ="gmcast.listen_addr=tcp://0.0.0.0:4010; "

Port for State Snaphot Transfer (default is 4444). It can be changed using the following option:
wsrep_sst_receive_address=10.11.12.205:5555

Port for Incremental State Transfer (default is port for group communication + 1 or 4568). It can be changed using the following option:
wsrep_provider_options = "ist.recv_addr=10.11.12.206:7777; "

 
已邀请:

Fan - 菜的抠脚

赞同来自: kongca

感觉percona写错了?
 
root@localhost 22:50:  [(none)]> show global variables like 'wsrep_provider_options'\G
*************************** 1. row ***************************
Variable_name: wsrep_provider_options
        Value: base_dir = /mfw_data/xtradb_G1_57/; base_host = 172.18.8.30; base_port = 14306; cert.log_conflicts = no; debug = no; evs.auto_evict = 0; evs.causal_keepalive_period = PT1S; evs.debug_log_mask = 0x1; evs.delay_margin = PT1S; evs.delayed_keep_period = PT30S; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT15S; evs.info_log_mask = 0; evs.install_timeout = PT7.5S; evs.join_retrans_period = PT1S; evs.keepalive_period = PT1S; evs.max_install_timeouts = 3; evs.send_window = 4; evs.stats_report_period = PT1M; evs.suspect_timeout = PT5S; evs.use_aggregate = true; evs.user_send_window = 2; evs.version = 0; evs.view_forget_timeout = P1D; gcache.dir = /mfw_data/xtradb_G1_57/; gcache.keep_pages_count = 0; gcache.keep_pages_size = 0; gcache.mem_size = 0; gcache.name = /mfw_data/xtradb_G1_57//galera.cache; gcache.page_size = 128M; gcache.size = 5G; gcomm.thread_prio = ; gcs.fc_debug = 0; gcs.fc_factor = 1.0; gcs.fc_limit = 500; gcs.fc_master_slave = YES; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; gcs
 
这上面找不到 listen_addr
 
我是这样搞的
port = 3307
wsrep_cluster_address = gcomm://192.168.2.109:4307,192.168.2.129:4307,192.168.2.130:4307,192.168.2.131:4307 #listen_addr是base_port指定
wsrep_sst_receive_address = 192.168.2.131:4445
# if multi instance need set ;base_port=port+1000;" and wsrep_cluster_address set with base_port
wsrep_provider_options = "gcache.size = 5G;gcs.fc_limit=500;gcs.fc_master_slave=YES;base_port=4307"
port = 3307

3307
4445
4307
4307+1 (默认是:组通信端口(4567)+ 1 = 4568, 这里是4308)

kongca - 80后IT男

赞同来自:

测试可以,感谢!

要回复问题请先登录注册