Documents

Konfigurasi Percona XtraDB Cluster Di Ubuntu 18

Description
Description:
Categories
Published
of 8
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Share
Transcript
  Konfigurasi Percona XtraDB Cluster di Ubuntu 18.04 Konfigurasi ini menggunakan 2 node Percona XtraDB cluster ubuntu 18.04 menggunakan paket dari repository percona     Node 1 o   Host name: Xtracluster1 o   IP address: 167.205.1.100     Node 2 o   Host name: Xtracluster2 o   IP address: 167.205.1.102 A.   Konfigurasi Percona XtraDB Cluster Allow firewall pada OS untuk port 3306,4444,4567,4568 pada kedua server ~]# Sudo ufw allow port/protocol Hapus paket Apparmor pada ke 2 server yang akan dilakuan instalasi percona ~]# apt-get remove apparmor  Perbaharui repository untuk menginstall Percona pada kedua server lalu install percona ~]# wget https://repo.percona.com/apt/percona-release_latest.generic_all   .deb ~]# dpkg -i dpkg -i percona-release_0.1-4.$(lsb_release -sc)_all.deb     ~]# apt-get update   ~]# apt-get install percona-xtradb-cluster-57    ~]# service mysql stop    B.   Konfigurasi cluster 1 1. konfigurasi file  /etc/mysql/my.cnf    untuk node ( Xtracluster1) [mysqld] datadir=/var/lib/mysql user=mysql # Path to Galera library wsrep_provider=/usr/lib/libgalera_smm.so # Cluster connection URL contains the IPs of node#1, node#2 and node#3 wsrep_cluster_address=gcomm://167.205.1.100,167.205.1.102 # In order for Galera to work correctly binlog format should be ROW binlog_format=ROW # MyISAM storage engine has only experimental support default_storage_engine=InnoDB # This InnoDB autoincrement locking mode is a requirement for Galera innodb_autoinc_lock_mode=2 # Node #1 address wsrep_node_address=167.205.1.100 # SST method wsrep_sst_method=xtrabackup-v2 # Cluster name wsrep_cluster_name=my_ubuntu_cluster # Authentication for SST method wsrep_sst_auth= sstuser:s3cretPass   2. Start node pertama untuk melakukan bootsrap cluster [root@xtradbcluster1 ~]# /etc/init.d/mysql bootstrap-pxc 3. cek status node pertama dengan command berikut mysql> show status like 'wsrep%'; +----------------------------+--------------------------------------+ | Variable_name | Value | +----------------------------+--------------------------------------+ | wsrep_local_state_uuid | b598af3e-ace3-11e2-0800-3e90eb9cd5d3 | ... | wsrep_local_state | 4 | | wsrep_local_state_comment | Synced | ... | wsrep_cluster_size | 1 | | wsrep_cluster_status | Primary | | wsrep_connected | ON | ... | wsrep_ready | ON | +----------------------------+--------------------------------------+ 40 rows in set (0.01 sec) 4. tambahkan userbaru untuk melakukan sst transfer antar server mysql> CREATE USER 'sstuser'@'localhost' IDENTIFIED BY 's3cretPass'; mysql> GRANT PROCESS, RELOAD, LOCK TABLES, REPLICATION CLIENT ON *.* TO 'sstuser'@'localhost'; mysql> FLUSH PRIVILEGES;  C.   Konfigurasi cluster 2 1. Konfigurasi  /etc/mysql/my.cnf    di node kedua ( Xtradbcluster2 ) [mysqld] datadir=/var/lib/mysql user=mysql # Path to Galera library wsrep_provider=/usr/lib/libgalera_smm.so # Cluster connection URL contains IPs of node#1, node#2 and node#3 wsrep_cluster_address=gcomm://167.205.1.100.167.205.1.102 # In order for Galera to work correctly binlog format should be ROW binlog_format=ROW # MyISAM storage engine has only experimental support default_storage_engine=InnoDB # This InnoDB autoincrement locking mode is a requirement for Galera innodb_autoinc_lock_mode=2 # Node #2 address wsrep_node_address=167.205.1.102 # Cluster name wsrep_cluster_name=my_ubuntu_cluster # SST method wsrep_sst_method=xtrabackup-v2 #Authentication for SST method wsrep_sst_auth= sstuser:s3cretPass
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks
SAVE OUR EARTH

We need your sign to support Project to invent "SMART AND CONTROLLABLE REFLECTIVE BALLOONS" to cover the Sun and Save Our Earth.

More details...

Sign Now!

We are very appreciated for your Prompt Action!

x