MariaDB galera cluster configuration test

Source: Internet
Author: User
Tags rsync

Reference to the https://fykuan.hsnuer.net/blog/2015/01/23/debian-%E4%B8%8A%E5%AE%89%E8%A3%9D-mariadb-galera-cluster/

IP List

192.168. 1.119 (Master) 192.168. 1.115

Master-Slave installation

sudo apt-get install python-software-propertiessudo apt0xcbcb082a1bb943dbsudo add  ' http://mirrors.ustc.edu.cn/mariadb/repo/10.1/debian/  wheezy main'sudo apt -get  updatesudo apt-get install Mariadb-galera-server

Configure users

Mysql-uroot-p here to create a user first clustermysql> GRANT USAGE on * * to [email protected]'%'Identified by'ABCDEFG'; MySQL> GRANT All privileges on * * to [email protected]'%'; MySQL> GRANT USAGE on * * to [email protected]'localhost'Identified by'ABCDEFG'; MySQL> GRANT All privileges on * * to [email protected]'localhost'; MySQL> FLUSH all privileges;

On Master

sudo cp/usr/share/mysql/wsrep.conf/etc/mysql/conf.d

Change it to the bottom.

[Mysqld]wsrep_provider=/usr/lib/galera/libgalera_smm.sobinlog_format=rowwsrep_cluster_ Name="my_cluster"wsrep_node_address=192.168. 1.119 #下面这行不能缺wsrep_cluster_address="gcomm://"wsrep_sst_method= rsync# This is used to synchronize the user Wsrep_sst_auth=CLUSTER:ABCDEFG

Slave machine

[Mysqld]wsrep_provider=/usr/lib/galera/libgalera_smm.sobinlog_format=rowwsrep_cluster_ Name="my_cluster"wsrep_node_address=192.168. 1.115 wsrep_cluster_address="gcomm://192.168.1.119"Wsrep_sst_method =rsync# This is used to synchronize the user Wsrep_sst_auth=CLUSTER:ABCDEFG

The test can be multiple master writes, the master hangs off, from the auto-master

MariaDB galera cluster configuration test

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.