Galera MariaDB Construction

Source: Internet
Author: User

1. Install the Service Pack Group:

Yum-y Install Mariadb-galera mariadb-galera-server xtrabackup

2. Modify the configuration file

Vim/etc/my.cnf.d/galera.cnf

Modify the following parameters:

wsrep_provider=/usr/lib64/galera/libgalera_smm.sowsrep_cluster_address= "gcomm://" wsrep_node_address= 172.16.0.11wsrep_sst_auth=sst:sstpass123wsrep_sst_method=xtrabackup Note: wsrep_cluster_address= "gcomm://"

3. Add the following line to the/ETC/MY.CNF:

!includedir/etc/my.cnf.d/

4. Set Boot mariadb

Chkconfig mysqld on

5. Confirm that the MARIADB is properly installed and in a running state

Service Mysqld Startmysql-uroot-penter Password:welcome to the MariaDB Monitor. Commands End With; or \g.your MariaDB connection ID is 14Server version:5.5.36-mariadb-wsrep MariaDB Server, Wsrep_25.9.r3961copyright (c) 2 Oracle, Monty program Ab and others. Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.

If there is a wsrep typeface output, the installation is normal.

6. Set the root password of the mariadb and do security hardening

/usr/bin/mysql_secure_installation

7. Create a new SST user in MySQL

Mysql-u root-pmysql> Grant USAGE on * * to [e-mail protected] '% ' identified by ' sstpass123 ';mysql> GRANT all Privil Eges on * * to [email protected] '% ';mysql> GRANT USAGE on * * to [email protected] ' localhost ' identified by ' sstpass123 ';mysql> GRANT all privileges on * * to [email protected] ' localhost ';mysql> FLUSH privileges;mysql> quit

8. See step 1-4 for the new node.


Galera MariaDB 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.