CentOS7.6 pxcレコードのインストール


percona pxc yumソースのインストール:
 sudo yum install https://repo.percona.com/yum/percona-release-latest.noarch.rpm
このステップではpercona-releaseパッケージがインストールされ、percona-releaseコマンドを実行してyumにインストールしたいPercona製品を構成できます.
ここではpercona-release構文です.
sudo percona-release ( | all) [ | all]
公式commandの説明は以下の通りです(私は翻訳しません):
Available commands are enable, enable-only, disable, and setup:
enable command turns on an additional Percona repository location. For example, the following command enables the ps-80 release repository location:
$ sudo percona-release enable ps-80 release enable-only command turns off all Percona repository locations, and enables the listed repository location after that. The following example first disables all Percona repository locations and then enables psmdb-40 experimental:
$ sudo percona-release enable-only psmdb-40 experimental disable disables the specified repositories (or just all of them). For example, following command will disable all repository locations:
$ sudo percona-release disable all setup command  disables all current Percona repository locations, then enables the correct release repositories given a product use, and updates the platform’s package manager database. is the only parameter of this command, and it can be chosen from the following list: ps56, ps57, ps80, psmdb34, psmdb36, psmdb40, pxb80, pxc56, pxc57, pxc80 (the names are self explanatory). Following example will disable all Percona repository locations and then enable the release repository for Percona Server for MySQL 8.0:
$ percona-release setup ps80
 
mysql 5を入れたいです.7版ですので、こちらで運行しています
percona-release setup pxc57
percona-release enable tools release
後で実行:
sudo yum install Percona-XtraDB-Cluster-57
これによりpxcサーバやpxc backupなどのプログラムがインストールされます.
公式チュートリアルではcnf
wsrep_provider=/usr/lib64/galera3/libgalera_smm.so

wsrep_cluster_name=pxc-cluster
wsrep_cluster_address=gcomm://192.168.70.61,192.168.70.62,192.168.70.63

wsrep_node_name=pxc1
wsrep_node_address=192.168.70.61

wsrep_sst_method=xtrabackup-v2
wsrep_sst_auth=sstuser:passw0rd

pxc_strict_mode=ENFORCING

binlog_format=ROW
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2

次の2つの構成項目は、ノードごとに異なります.
wsrep_node_name=pxc1
wsrep_node_address=192.168.70.61
構成完了my.cnfの後、新しく追加した構成項目の前に[mysqld]を追加しないとエラーが発生します.
3つのノードを構成した後、最初のノードを起動します.
systemctl start [email protected] 
起動は起動しましたが、他のノードは起動できません.(その他のノード起動コマンド:servicemysql start)
次のファイルを構成する必要があります.
/etc/percona-xtradb-cluster.conf.d/mysqld.cnf
/etc/percona-xtradb-cluster.conf.d/wsrep.cnf
最後に、まだ起動できない場合は、telnetでnode 1を試してみてください.
telnetをインストールしていない場合はコマンド:yum install-y telnet*
あなたはtelnetがmysqlに通じてこそ正常に接続できます.
すべてのファイアウォールを閉じるか、ファイアウォールに対応するインタフェースを開きます.
iptables-Fこのコマンドは、すべてのファイアウォールルールを削除します.(ご注意!!)
まだ接続できない場合は、node 1のmysqlユーザーが外部マシンへのアクセスを許可しているかどうかを確認します.
use mysql;
update user set host = ’%’ where user = ’sstuser’;
grant all privileges  on *.* to root@'%' identified by "password";
flush privileges;
残りのどのようにpxcのネット上ですべてチュートリアルがあって、みんなは自分で検索します.手順が間違っている場合は、常にインストールに失敗します.