In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you "how to install mysql5.7 PXC", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to install mysql5.7 PXC" this article.
Environmental information
172.31.217.182 bd-dev-mingshuo-182
172.31.217.183 bd-dev-mingshuo-183
172.31.217.89 bd-dev-vertica-89
Dependency relationship
1. Install Percona-XtraBackup (dependent on libev-4.03-3.el6.x86_64.rpm)
2.yum install-y git scons gcc gcc-c++ openssl check cmake bison boost-devel asio-devel libaio-devel ncurses-devel readline-devel pam-devel socat perl-DBD* perl-IO* perl-Time*
3.wget http://dl.fedoraproject.org/pub/epel/6/x86_64/Packages/s/socat-1.7.2.3-1.el6.x86_64.rpm
4. Install qpress
Download PXC software
Https://www.percona.com/downloads/Percona-XtraDB-Cluster-57/LATEST/ install PXC
Decompression package
Yum localinstall Percona-XtraDB-Cluster*rpm-y configure PXC parameters
89 nodes:
# pxc
Loose-wsrep_cluster_name=pxc-test1
Loose-wsrep_cluster_address=gcomm://172.31.217.182172.31.217.183172.31.217.89
Loose-wsrep_node_name=bd-dev-vertica-89
Loose-wsrep_node_address=172.31.217.85
Loose-wsrep_sst_method=xtrabackup-v2
Loose-wsrep_sst_auth=pxc:oracle
Loose-pxc_strict_mode=ENFORCING
Loose-wsrep_provider_options= "gcache.size=1G"
Loose-wsrep_provider=/usr/lib64/galera3/libgalera_smm.so
Binlog_format=ROW
Default_storage_engine=InnoDB
Innodb_autoinc_lock_mode=2
182 nodes:
# pxc
Wsrep_provider=/usr/lib64/galera3/libgalera_smm.so
Wsrep_cluster_name=pxc-test1
Wsrep_cluster_address=gcomm://172.31.217.182172.31.217.183172.31.217.89
Wsrep_node_name=bd-dev-mingshuo-182
Wsrep_node_address=172.31.217.182
Wsrep_sst_method=xtrabackup-v2
Wsrep_sst_auth=pxc:oracle
Pxc_strict_mode=ENFORCING
Binlog_format=ROW
Default_storage_engine=InnoDB
Innodb_autoinc_lock_mode=2
Wsrep_provider_options= "gcache.size=1G"
183 nodes:
# pxc
Wsrep_provider=/usr/lib64/galera3/libgalera_smm.so
Wsrep_cluster_name=pxc-test1
Wsrep_cluster_address=gcomm://172.31.217.182172.31.217.183172.31.217.89
Wsrep_node_name=bd-dev-mingshuo-183
Wsrep_node_address=172.31.217.183
Wsrep_sst_method=xtrabackup-v2
Wsrep_sst_auth=pxc:oracle
Pxc_strict_mode=ENFORCING
Binlog_format=ROW
Default_storage_engine=InnoDB
Innodb_autoinc_lock_mode=2
Wsrep_provider_options= "gcache.size=1G" comment:
The parameter innodb_autoinc_lock_mode controls the behavior of related locks when inserting data into a table with an auto_increment column
There are three values for innodb_auto_lockmode:
0 this represents the tradition tradition
This means that consecutive is continuous.
2, which means interleaved interleaving.
The other two nodes only need to be modified:
Server-id-- id can't be the same
Wsrep_node_name-change to the hostname of your own node
Wsrep_node_address-- changed to the host IP of your own node
Initialization, only on 89 nodes
Mysqld-defaults-file=/etc/my.cnf-initialize-datadir=/opt/mysql/3307/data-user=mysql-basedir=/opt/mysql/mysql-5.7
Start the mysql and PXC,89 nodes
Mysqld_safe-defaults-file=/etc/my.cnf-wsrep-new-cluster &
Note:
Start with-- wsrep-new-cluster and let him ignore the parameters: wsrep_cluster_address lets him know that he is the first node in the cluster and does not have to look for other nodes during startup.
Change password, 89 nodes
Alter user 'root'@'localhost' identified by' oracle'
Flush privileges
Create users, 89 nodes
Create user 'pxc'@'localhost' identified by' oracle'
Grant all privileges on *. * to 'pxc'@'localhost'
Flush privileges
Start the other two nodes without initialization, the other two nodes
Mysqld_safe-- defaults-file=/etc/my3307.cnf &
Mysqld_safe-defaults-file=/etc/my3307.cnf & 183Node insert data
Create database ming
Use ming
Create table T1 (aint, b int,constraint pk_a primary key (a))
Insert into T1 values (1), (2)
The other two nodes view the data
Select * from ming.t1
These are all the contents of the article "how to install mysql5.7 PXC". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.