PXC安裝
在centos 7.2.1511上
10.23.100.11,
10.23.30.164,
10.23.77.125
這三個機器上安裝pxc
1 關閉firewall
systemctl status firewalld
2 關閉selinux
sestatus
3 安裝
wget "https://www.percona.com/redir/downloads/percona-release/redhat/0.1-4/percona-release-0.1-4.noarch.rpm"
rpm -ivh percona-release-0.1-4.noarch.rpm
yum install Percona-XtraDB-Cluster-full-56.x86_64 -y
4 第一個節點的配置檔案:
[mysqld]
log_bin
binlog_format = ROW
innodb_buffer_pool_size = 100M
innodb_flush_log_at_trx_commit = 0
innodb_flush_method = O_DIRECT
innodb_log_files_in_group = 2
innodb_log_file_size = 20M
innodb_file_per_table = 1
datadir = /var/lib/mysql
wsrep_provider = /usr/lib64/galera3/libgalera_smm.so
wsrep_slave_threads = 8
wsrep_cluster_name = Cluster
wsrep_node_name = Node1
innodb_locks_unsafe_for_binlog = 1
innodb_autoinc_lock_mode = 2
wsrep_cluster_address=gcomm://10.23.100.11,10.23.30.164,10.23.77.125
default_storage_engine=InnoDB
wsrep_node_address=10.23.100.11
# SST method
wsrep_sst_method=xtrabackup-v2
# Authentication for SST method
wsrep_sst_auth="song:test"
[mysqld_safe]
pid-file = /run/mysqld/mysql.pid
syslog
!includedir /etc/my.cnf.d
啟動
systemctl start mysql@bootstrap.service
檢視狀態
show status like 'wsrep%';
CREATE USER 'song'@'localhost' IDENTIFIED BY 'test';
GRANT RELOAD, LOCK TABLES, REPLICATION CLIENT ON *.* to 'song'@'localhost';
flush privileges;
5 第二個節點的配置檔案
[mysqld]
log_bin
binlog_format = ROW
innodb_buffer_pool_size = 100M
innodb_flush_log_at_trx_commit = 0
innodb_flush_method = O_DIRECT
innodb_log_files_in_group = 2
innodb_log_file_size = 20M
innodb_file_per_table = 1
datadir = /var/lib/mysql
wsrep_provider = /usr/lib64/galera3/libgalera_smm.so
wsrep_slave_threads = 8
wsrep_cluster_name = Cluster
wsrep_node_name = Node2
innodb_locks_unsafe_for_binlog = 1
innodb_autoinc_lock_mode = 2
wsrep_cluster_address=gcomm://10.23.100.11,10.23.30.164,10.23.77.125
default_storage_engine=InnoDB
wsrep_node_address=10.23.30.164
# SST method
wsrep_sst_method=xtrabackup-v2
# Authentication for SST method
wsrep_sst_auth="song:test"
[mysqld_safe]
pid-file = /run/mysqld/mysql.pid
syslog
!includedir /etc/my.cnf.d
啟動:
systemctl start mysql
檢視狀態
show status like 'wsrep%';
6 第三個節點的配置檔案:
[mysqld]
log_bin
binlog_format = ROW
innodb_buffer_pool_size = 100M
innodb_flush_log_at_trx_commit = 0
innodb_flush_method = O_DIRECT
innodb_log_files_in_group = 2
innodb_log_file_size = 20M
innodb_file_per_table = 1
datadir = /var/lib/mysql
wsrep_provider = /usr/lib64/galera3/libgalera_smm.so
wsrep_slave_threads = 8
wsrep_cluster_name = Cluster
wsrep_node_name = Node3
innodb_locks_unsafe_for_binlog = 1
innodb_autoinc_lock_mode = 2
wsrep_cluster_address=gcomm://10.23.100.11,10.23.30.164,10.23.77.125
default_storage_engine=InnoDB
wsrep_node_address=10.23.77.125
# SST method
wsrep_sst_method=xtrabackup-v2
# Authentication for SST method
wsrep_sst_auth="song:test"
[mysqld_safe]
pid-file = /run/mysqld/mysql.pid
syslog
!includedir /etc/my.cnf.d
啟動:
systemctl start mysql
檢視狀態
show status like 'wsrep%';
轉載請註明源出處
QQ 273002188 歡迎一起學習QQ 群 236941212
oracle,mysql,PG 相互交流來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25099483/viewspace-2127255/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- PXC安裝步驟_binary版本
- 安裝配置PXC(Percona XtraDB Cluster)叢集
- PXC(Percona XtraDB Cluster)叢集的安裝
- PXC(Percona XtraDB Cluster)叢集安裝
- 丐版pxc叢集
- centos 6.9搭建pxc叢集CentOS
- MySQL叢集搭建方案(PXC)MySql
- PerconaXtraDBClusterStrictMode(PXC5.7)
- 【MySQL】 在Docker中快速部署PXCMySqlDocker
- codis安裝 (java 安裝 + zookeeper 安裝 + go 安裝 + codis 安裝JavaGo
- PXC(Percona-XtraDB-Cluster)5.7版本叢集安裝和使用初探
- 沃趣微講堂 | PXC、MGC&MGR原理與實踐對比(八):PXC、MGC和MGR crash recoveryGC
- 沃趣微講堂 | PXC、MGC&MGR原理與實踐對比(四):PXC、MGC新增節點流程GC
- MySQL高可用架構-MMM、MHA、MGR、PXCMySql架構
- MySQL高可用方案-PXC環境部署記錄MySql
- MySQL高可用架構之PXC實踐MySql架構
- 安裝npm 解除安裝npm 安裝apidocNPMAPI
- mysql安裝 (yum 安裝)MySql
- MMM安裝、MHA安裝
- 沃趣微講堂 | PXC、MGC&MGR原理與實踐對比(六):PXC、MGC叢集初始化GC
- mysql安裝------RPM包安裝及解除安裝MySql
- oracle安裝:OUI安裝Oracle(圖形介面安裝)OracleUI
- ffmpeg安裝之mac安裝Mac
- docker安裝及解除安裝Docker
- 02 安裝git、安裝TortoiseGitGit
- Ubuntu解除安裝和安裝Ubuntu
- Orace RAC安裝-DNS安裝DNS
- caffe安裝系列——安裝OpenCVOpenCV
- SPARK 安裝之scala 安裝Spark
- mac 安裝opencv homebrew安裝MacOpenCV
- Oracle 安裝與解除安裝Oracle
- solaris mysql 安裝 解除安裝MySql
- BiocManager安裝,devtools安裝dev
- JDK安裝和解除安裝JDK
- 安裝HomeBrew提示已安裝並無法解除安裝
- SQL Server 2012 安裝——安裝 OR 解除安裝SQLServer
- pxc 事務pre-commit狀態阻塞MIT
- MySQL中介軟體之ProxySQL(14):ProxySQL+PXCMySql