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