Hello All ,
I want to set up a second xtra mysql cluster on the same server. I added the my.cnf files from the 1st server. I ran the 1st cluster with systemctl bootstart and there is no problem, I get the error in the attachment when I run the 2nd cluster with mysqld bootstart. If you have any suggestions on the subject, please help. Thank you very much
- Cluster Conf
root@mysql01:~# cat /etc/mysql/my.cnf
[mysqld]
server-id = 101
datadir = /clu01
log-bin = mysql01
log-error = /var/log/mysql/error.log
log_error_verbosity = 2
bind-address = 10.0.5.71
pxc_encrypt_cluster_traffic = OFF
#InnoDB
innodb_buffer_pool_size = 512M
#Wsrep
wsrep_provider = /usr/lib/galera4/libgalera_smm.so
wsrep_cluster_address = “gcomm://10.0.5.71,10.0.5.72,10.0.5.73”
wsrep_cluster_name = clu01
wsrep_node_name = mysql01
wsrep_node_address = 10.0.5.71
wsrep_sst_method = xtrabackup-v2
- Cluster Conf
*root@mysql01:~# cat /etc/mysql/my2.cnf *
[mysqld]
server-id = 201
port = 5306
mysqlx_port = 53060
socket=/var/run/mysqld/mysqld2.sock
pid-file=/var/run/mysqld/mysqld2.pid
datadir = /clu02
log-bin = mysql01
log-error = /var/log/mysql/error2.log
log_error_verbosity = 2
bind-address = 10.0.5.71
pxc_encrypt_cluster_traffic = OFF
#InnoDB
innodb_buffer_pool_size = 256M
#Wsrep
wsrep_provider = /usr/lib/galera4/libgalera_smm.so
wsrep_cluster_address = “gcomm://10.0.5.71,10.0.5.72,10.0.5.73”
wsrep_provider_options =“base_port=6567;gmcast.listen_addr=tcp://0.0.0.0:5567;”
wsrep_cluster_name = clu02
wsrep_node_name = mysql01
wsrep_node_address = 10.0.5.71
wsrep_sst_method = xtrabackup-v2
To run the 1st cluster;
systemctl start mysql@bootstrap.service
To run the 2nd cluster;
mysqld --defaults-file=/etc/mysql/my2.cnf --user=mysql --bootstrap
Thanks & Regards
Helllo All ,
I forget put error2.log.Here is the error2.log
2024-12-18T08:41:28.400785Z 0 [Note] [MY-000000] [Galera] Failed to establish connection: Connection refused
2024-12-18T08:41:28.424523Z 0 [Note] [MY-000000] [Galera] PC protocol downgrade 1 → 0
2024-12-18T08:41:28.424630Z 0 [Note] [MY-000000] [Galera] Current view of cluster as seen by this node
view ((empty))
2024-12-18T08:41:28.425278Z 0 [ERROR] [MY-000000] [Galera] failed to open gcomm backend connection: 110: failed to reach primary view (pc.wait_prim_timeout)
at …/…/…/…/percona-xtradb-cluster-galera/gcomm/src/pc.cpp:connect():176
2024-12-18T08:41:28.425362Z 0 [ERROR] [MY-000000] [Galera] …/…/…/…/percona-xtradb-cluster-galera/gcs/src/gcs_core.cpp:gcs_core_open():222: Failed to open backend connection: -110 (Connection timed out)
2024-12-18T08:41:29.425869Z 0 [Note] [MY-000000] [Galera] gcomm: terminating thread
2024-12-18T08:41:29.425978Z 0 [Note] [MY-000000] [Galera] gcomm: joining thread
2024-12-18T08:41:29.426085Z 0 [ERROR] [MY-000000] [Galera] …/…/…/…/percona-xtradb-cluster-galera/gcs/src/gcs.cpp:gcs_open():1934: Failed to open channel ‘clu02’ at ‘gcomm://10.0.5.71,10.0.5.72,10.0.5.73’: -110 (Connection timed out)
2024-12-18T08:41:29.426124Z 0 [ERROR] [MY-000000] [Galera] gcs connect failed: Operation timed out
2024-12-18T08:41:29.426141Z 0 [ERROR] [MY-000000] [WSREP] Provider/Node (gcomm://10.0.5.71,10.0.5.72,10.0.5.73) failed to establish connection with cluster (reason: 7)
2024-12-18T08:41:29.426163Z 0 [ERROR] [MY-010119] [Server] Aborting
Thanks
wsrep_cluster_address = “gcomm://10.0.5.71,10.0.5.72,10.0.5.73”
This needs to be port specific: 10.0.5.71:5557
Running two, independent, 3-node PXC clusters (ie: 6 mysql daemons) on 1 machine will be quite difficult. You can get free VMs from AWS to test out something like this if you are tight on resources.
You might want to also look at anydbver which has support for PXC.