15, high-usable PXC (Percona xtradb cluster) construction

Source: Internet
Author: User
Tags mysql create install perl mysql create user percona

Installation Environment:
Cluster Name Pxc_lk
Node 1: 192.168.1.20
Node 2: 192.168.1.21
Node 3: 192.168.1.22
All node installationswget http://www.percona.com/redir/downloads/XtraBackup/LATEST/binary/redhat/6/x86_64/ percona-xtrabackup-2.2.3-4982.el6.x86_64.rpm wget http://www.percona.com/redir/downloads/Percona-XtraDB-Cluster/ Latest/binary/linux/x86_64/percona-xtradb-cluster-5.5.37-rel35.0-25.10.756.linux.x86_64.tar.gzyum Install Perl-dbd-mysqlyum Install Perl-io-socket-ssl.noarchYum Install SocatYum Install NCall nodes install the PXC databasecd/opt/mysql/tar-zxvf/root/percona-xtradb-cluster-5.5.37-rel35.0-25.10.756.linux.x86_64.tar.gz ln-s/opt/mysql/ percona-xtradb-cluster-5.5.37-rel35.0-25.10.756.linux.x86_64//usr/local/pxc_3308 configuration file to be placed in the default/etc/my.cnfvi/etc/ My.cnf    --Configuration file note the following parameters and add the Red Section
  1. basedir                         = / opt / mysql / Percona - xtradb - cluster - 5.5 37 - rel35 0 - 25.10 756.linux x86_64
  2. datadir                         =/data/mysql/pxc_3308/data
  3. tmpdir                          =/data/mysql/pxc_3308/tmp
  4. server_id                      =203308
  5. #percona xtradb cluster
  6. binlog_format                  =  ROW--The log format must be row
  7. default_storage_engine=InnoDB
  8. innodb_locks_unsafe_for_binlog=1
  9. innodb_autoinc_lock_mode=2
  10. wsrep_cluster_name=pcx_lk--cluster's name.
  11. wsrep_cluster_address=gcomm://192.168.1.20,192.168.1.21,192.168.1.22    --集群中所有node-ip
  12. wsrep_node_address = 192.168 1.20         --each node is configured as its own ip
  13. wsrep_provider=/usr/local/pxc_3308/lib/libgalera_smm.so
  14. #wsrep_sst_method=rsync
  15. wsrep_sst_method=xtrabackup
  16. wsrep_sst_auth=sst:wubxwubx        --运输的用户
Mkdir-p/data/mysql/pxc_3308/{data,tmp,logs}chown-r Mysql:mysql/data/mysqlLN-SF/USR/LIB64/LIBSSL.SO.10/USR/LIB64/LIBSSL.SO.6LN-SF/USR/LIB64/LIBCRYPTO.SO.10/USR/LIB64/LIBCRYPTO.SO.6CD/ opt/mysql/percona-xtradb-cluster-5.5.37-rel35.0-25.10.756.linux.x86_64/./scripts/mysql_install_db--datadir=/ DATA/MYSQL/PXC_3308/DATACP SUPPORT-FILES/MYSQL.SERVER/ETC/INIT.D/MYSQL-PXCVI/ETC/INIT.D/MYSQL-PXC
  1. basedir =/ / mysql / Percona - xtradb - cluster - 5.5 37 - rel35 0 - 25.10 756.linux x86_64
  2. datadir=/data/mysql/pxc_3308/data
The first node starts:#/ETC/INIT.D/MYSQL-PXC BOOTSTRAP-PXC    --cannot be started with mysqldAfter startup, go to MySQL Create user (testing) [Email protected]alhost [(none)]> grant all privileges on * * to ' SST ' @ '% ' identified by ' Wubxw UBX ';(testing) [email protected] [(none)]> grant Reload,lock tables, replication client on * * to ' sst ' @ ' localhost ' iden Tified by ' WUBXWUBX ';(testing) [email protected] [(none)]> flush privileges;then start the other node:#/ETC/INIT.D/MYSQL-PXC Start

15, high-usable PXC (Percona xtradb cluster) 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.