(Empty the firewall and disable SELinux)
1. Create an account for synchronizing the database in each database
GRANT USAGE on *. * to Root @ '% ' identified by ' 123 4 ';
GRANT All privileges on * * to Root @ '% ';
FLUSH privileges;
2.cd/usr/share/mysql/
CP my-large.cnf /etc/my.cnf
CP wsrep.cnf /etc/my.cnf.d/wsrep.cnf
3.first Node
VImmy.cnf
Add last Face
!includedir/etc/my.cnf.d/
4.vim/etc/my.cnf.d/wsrep.cnf
Add
Wsrep_on=on
Modify
Wsrep_provider=/usr/lib64/galera/libgalera_smm.so
Wsrep_cluster_name= "Nodes"
Wsrep_cluster_address= "gcomm://"
Wsrep_node_name= "Node1"
wsrep_node_address= " This machine IP Address "
Wsrep_sst_method=rsync
Wsrep_sst_auth=root:password
5. Different from the main node configuration
Wsrep_cluster_address= "Gcomm://node1,node2,node3"
wsrep_node_name= "Node This machine "
wsrep_node_address= " This machine IP Address "
6. Master node start service MySQL Bootstrap
7. starting service MySQL start from a node
This article is from the "technology Change the World" blog, reproduced please contact the author!
MARIADB Cluster Construction