[email protected] ~]# Yum install Bison bison-devel check check-devel boost Boost-devel scons socat perl-dbd-mysql
[Email protected] ~]# RPM-IVH libev-4.15-1.el6.rf.x86_64.rpm
[Email protected] ~]# RPM-IVH percona-xtrabackup-24-2.4.9-1.el6.x86_64.rpm
[Email protected] ~]# tar zxvf mysql-wsrep-5.6.38-25.21.tar.gz
[Email protected] ~]# CD mysql-wsrep-5.6.38-25.21
[Email protected] mysql-wsrep-5.6.38-25.21]# CMake. \
-dcmake_build_type=release \
-dcmake_install_prefix=/usr/local/mysql \
-dmysql_datadir=/usr/local/mysql/data \
-DSYSCONFDIR=/ETC \
-dmysql_unix_addr=/tmp/mysql.sock \
-dwith_innobase_storage_engine=1 \
-dwith_csv_storage_engine=1 \
-dwith_archive_storage_engine=1 \
-dwith_blackhole_storage_engine=1 \
-dwith_federated_storage_engine=1 \
-dwith_partition_storage_engine=1 \
-dwith_perfschema_storage_engine=1 \
-ddefault_charset=utf8 \
-DDEFAULT_COLLATION=UTF8_GENERAL_CI \
-dwith_embedded_server=0 \
-dwith_wsrep=1 \
-dwith_innodb_disallow_writes=1
[[email protected] mysql-wsrep-5.6.38-25.21]# make && make install
[Email protected] mysql-wsrep-5.6.38-25.21]# CD support-files/
[email protected] mysql-wsrep-5.6.38-25.21]# CP mysql.server/etc/init.d/mysqld
[Email protected] ~]# VI/ETC/MY.CNF
bind-address=0.0.0.0
Default_storage_engine=innodb
innodb_autoinc_lock_mode=2
Innodb_flush_log_at_trx_commit=0
Wsrep_provider =/usr/local/mysql/lib/libgalera_smm.so
Wsrep_provider_options= "gcache.size=300m; gcache.page_size=300m "
Wsrep_cluster_name = "My_wsrep_cluster"
wsrep_cluster_address = "gcomm://192.168.1.201,192.168.1.202"
Wsrep_sst_method=xtrabackup-v2
Wsrep_sst_auth=sst:sst
Wsrep_node_name = king01
Wsrep_node_address= "192.168.1.201"
Log_bin = Mysql-bin
Binlog_format = row
Sync_binlog = 1
Binlog_cache_size = 16M
Max_binlog_cache_size = 32M
Max_binlog_size = 512M
Expire_logs_days = 7
[Email protected] ~]# tar zxvf galera-3-25.3.22.tar.gz
[Email protected] ~]# CD galera-3-25.3.22
[Email protected] galera-3-25.3.22]# scons
[email protected] galera-3-25.3.22]# CP libgalera_smm.so/usr/local/mysql/lib/
[email protected] galera-3-25.3.22]# CP Garb/garbd/usr/local/mysql/bin
[Email protected] ~]# cd/usr/local/mysql/
[Email protected] mysql]# scripts/mysql_install_db--user=mysql--basedir=/usr/local/mysql--datadir=/usr/local/ Mysql/data
[[Email protected] ~]# service mysqld start--wsrep-new-cluster
[Email protected] ~]# mysql_secure_installation
[Email protected] ~]# mysql-uroot-pabcd.1234
Mysql> Grant Usage on *. * to [e-mail protected] ' localhost ' identified by ' SST ';
Query OK, 0 rows affected (0.05 sec)
Mysql> Grant all privileges on * * to [email protected] ' localhost ';
Query OK, 0 rows Affected (0.00 sec)
mysql> flush Privileges;
Query OK, 0 rows Affected (0.00 sec)
[Email protected] ~]# NETSTAT-TUNLP | grep mysqld
TCP 0 0 0.0.0.0:4567 0.0.0.0:* LISTEN 18117/mysqld
TCP 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 18117/mysqld
[Email protected] ~]# RPM-IVH epel-release-6-8.noarch.rpm
[email protected] ~]# Yum install Bison bison-devel check check-devel boost Boost-devel scons socat perl-dbd-mysql
[Email protected] ~]# RPM-IVH libev-4.15-1.el6.rf.x86_64.rpm
[Email protected] ~]# RPM-IVH percona-xtrabackup-24-2.4.9-1.el6.x86_64.rpm
[Email protected] ~]# tar zxvf mysql-wsrep-5.6.38-25.21.tar.gz
[Email protected] ~]# CD mysql-wsrep-5.6.38-25.21
[Email protected] mysql-wsrep-5.6.38-25.21]# CMake. \
-dcmake_build_type=release \
-dcmake_install_prefix=/usr/local/mysql \
-dmysql_datadir=/usr/local/mysql/data \
-DSYSCONFDIR=/ETC \
-dmysql_unix_addr=/tmp/mysql.sock \
-dwith_innobase_storage_engine=1 \
-dwith_csv_storage_engine=1 \
-dwith_archive_storage_engine=1 \
-dwith_blackhole_storage_engine=1 \
-dwith_federated_storage_engine=1 \
-dwith_partition_storage_engine=1 \
-dwith_perfschema_storage_engine=1 \
-ddefault_charset=utf8 \
-DDEFAULT_COLLATION=UTF8_GENERAL_CI \
-dwith_embedded_server=0 \
-dwith_wsrep=1 \
-dwith_innodb_disallow_writes=1
[[email protected] mysql-wsrep-5.6.38-25.21]# make && make install
[Email protected] mysql-wsrep-5.6.38-25.21]# CD support-files/
[email protected] mysql-wsrep-5.6.38-25.21]# CP mysql.server/etc/init.d/mysqld
[Email protected] ~]# VI/ETC/MY.CNF
bind-address=0.0.0.0
Default_storage_engine=innodb
innodb_autoinc_lock_mode=2
Innodb_flush_log_at_trx_commit=0
Wsrep_provider =/usr/local/mysql/lib/libgalera_smm.so
Wsrep_provider_options= "gcache.size=300m; gcache.page_size=300m "
Wsrep_cluster_name = "My_wsrep_cluster"
wsrep_cluster_address = "gcomm://192.168.1.201,192.168.1.202"
Wsrep_sst_method=xtrabackup-v2
Wsrep_sst_auth=sst:sst
Wsrep_node_name = king02
Wsrep_node_address= "192.168.1.202"
Log_bin = Mysql-bin
Binlog_format = row
Sync_binlog = 1
Binlog_cache_size = 16M
Max_binlog_cache_size = 32M
Max_binlog_size = 512M
Expire_logs_days = 7
[Email protected] ~]# tar zxvf galera-3-25.3.22.tar.gz
[Email protected] ~]# CD galera-3-25.3.22
[Email protected] galera-3-25.3.22]# scons
[email protected] galera-3-25.3.22]# CP libgalera_smm.so/usr/local/mysql/lib/
[email protected] galera-3-25.3.22]# CP Garb/garbd/usr/local/mysql/bin
[Email protected] ~]# cd/usr/local/mysql/
[Email protected] mysql]# scripts/mysql_install_db--user=mysql--basedir=/usr/local/mysql--datadir=/usr/local/ Mysql/data
[[Email protected] ~]# service mysqld start
[Email protected] ~]# NETSTAT-TUNLP | grep mysqld
TCP 0 0 0.0.0.0:4567 0.0.0.0:* LISTEN 18364/mysqld
TCP 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 18364/mysqld
MYSQL Galera Deployment Transcript