MARIADB Cluster Construction

Source: Internet
Author: User

(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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.