CentOS percona-xtradb-cluster-56 Installation

Source: Internet
Author: User
Tags configuration settings percona

Percona-xtradb-cluster Environment

" 3 nodes deployed on a single physical server "


First, related software installation


#安装前确认源安装mysql已经卸载

#rpm-qa |grep mysql*

#rpm-E--nodeps mysql-server-5.1.73-5.el6_6 mysql-libs-5.1.73-5.el6_6 mysql-5.1.73-5.el6_6 mysql-devel-5.1.73-5.el6 _6


Yum-y Install http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm

Yum-y Install wget

wget http://www.convirture.com/repos/deps/RHEL/6.x/x86_64/socat-1.7.1.3-1.el6.rf.x86_64.rpm

Yum-y Install Tcp_wrappers

RPM-IVH socat-1.7.1.3-1.el6.rf.x86_64.rpm

Yum-y Install percona-xtradb-cluster-56


Second, initialization and configuration settings


Attached:[MY.4000.CNF] Remember to change the other two configuration files accordingly

#--------------------------------------------------------------------------------

#

[Mysqld]

datadir=/var/lib/mysql4000

Socket=/var/lib/mysql4000/mysql.sock

User=mysql

port=4000

Character_set_server = UTF8

#Path to Galera Library

Wsrep_provider=/usr/lib64/libgalera_smm.so


#Cluster connection URL contains IPs of Node#1,node#2,and node#3

#wsrep_cluster_address =gcomm://192.168.1.224

wsrep_cluster_address= ' gcomm://192.168.1.224:5030,192.168.1.224:6030 '

wsrep_sst_receive_address=192.168.1.224:4020

wsrep_node_incoming_address=192.168.1.224

wsrep_slave_threads=2

Wsrep_provider_options = "gmcast.listen_addr=tcp://192.168.1.224:4030;"

#In order for Galera to work correctly binlog format should is ROW

Binlog_format=row


#MyISAM storage engine have only experimental support

Default_storage_engine=innodb


#This changes how InnoDB autoincrement locks be managed and is a requirement for Galera

innodb_autoinc_lock_mode=2


#Node #2 Address

wsrep_node_address=192.168.1.224


#Cluster Name

Wsrep_cluster_name=my_cluster


#SST method

#wsrep_sst_method =xtrabackup-v2

Wsrep_sst_method=rsync

wsrep_node_name=node4000

Innodb_locks_unsafe_for_binlog=1


# Disabling Symbolic-links is recommended to prevent assorted security risks

Symbolic-links=0


[Mysqld_safe]

Log-error=/var/log/mysqld4000.log

Pid-file=/var/run/mysqld/mysqld4000.pid


#--------------------------------------------------------------------------------


mysql_install_db--user=mysql--datadir=/var/lib/mysql4000--defaults-file=/etc/my.4000.cnf

mysql_install_db--user=mysql--datadir=/var/lib/mysql5000--defaults-file=/etc/my.5000.cnf

mysql_install_db--user=mysql--datadir=/var/lib/mysql6000--defaults-file=/etc/my.6000.cnf


Third, the start of PXC


/usr/bin/mysqld_safe--defaults-file=/etc/my.4000.cnf--wsrep-new-cluster &

/usr/bin/mysqld_safe--DEFAULTS-FILE=/ETC/MY.5000.CNF &

/usr/bin/mysqld_safe--DEFAULTS-FILE=/ETC/MY.6000.CNF &


Iv. follow-up related tests



This article is from the "wosec" blog, make sure to keep this source http://pathyon.blog.51cto.com/9465112/1697927

CentOS percona-xtradb-cluster-56 Installation

Related Article

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.