mariadb:galera
差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
| mariadb:galera [2015/08/10 01:51] – clownclown | mariadb:galera [2025/02/16 13:53] (現在) – 外部編集 127.0.0.1 | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| - | ===== MariaDB Galera Cluster ===== | + | ====== MariaDB Galera Cluster |
| http:// | http:// | ||
| https:// | https:// | ||
| + | ===== Install ===== | ||
| + | ==== Adding the MariaDB YUM Repository ==== | ||
| < | < | ||
| - | vi / | + | # vi / |
| </ | </ | ||
| + | === MariaDB 10.0 CentOS repository list === | ||
| + | < | ||
| + | [mariadb] | ||
| + | name = MariaDB | ||
| + | baseurl = http:// | ||
| + | gpgkey=https:// | ||
| + | gpgcheck=1 | ||
| + | </ | ||
| + | |||
| + | === MariaDB 5.5 CentOS repository list === | ||
| < | < | ||
| [mariadb] | [mariadb] | ||
| 行 17: | 行 29: | ||
| </ | </ | ||
| + | ==== Installing MariaDB Galera Cluster with YUM ==== | ||
| < | < | ||
| - | yum install MariaDB-Galera-server MariaDB-client galera | + | # yum install MariaDB-Galera-server MariaDB-client galera |
| </ | </ | ||
| + | ==== Configure ==== | ||
| + | https:// | ||
| + | http:// | ||
| < | < | ||
| - | vi / | + | # vi / |
| </ | </ | ||
| < | < | ||
| - | [mysqld] | + | [galera] |
| - | max_connect_errors=999999999 | + | # Mandatory settings |
| + | # 任意のクラスタ名、デフォルト「my_wsrep_cluster」 | ||
| wsrep_cluster_name=DBCLUSTER | wsrep_cluster_name=DBCLUSTER | ||
| - | wsrep_cluster_address=gcomm:// | + | # ライブラリファイルをフルパスで指定 |
| - | wsrep_node_address=192.168.234.130 | + | |
| wsrep_provider='/ | wsrep_provider='/ | ||
| - | wsrep_sst_method=rsync | + | # 参加するクラスタ・ノードのIPを指定。 |
| + | wsrep_cluster_address=gcomm:// | ||
| + | # 自分のIPアドレスを指定、デフォルトはeth0のIPアドレス | ||
| + | wsrep_node_address=192.168.56.211 | ||
| + | |||
| + | # CPUコア数の2倍、書き込み接続数の1/ | ||
| wsrep_slave_threads=4 | wsrep_slave_threads=4 | ||
| + | innodb_locks_unsafe_For_binlog=1 | ||
| + | |||
| + | binlog_format=row | ||
| default_storage_engine=InnoDB | default_storage_engine=InnoDB | ||
| - | binlog_format=ROW | ||
| innodb_autoinc_lock_mode=2 | innodb_autoinc_lock_mode=2 | ||
| - | innodb_locks_unsafe_for_binlog=1 | + | bind-address=0.0.0.0 |
| </ | </ | ||
| + | ==== Start Services ==== | ||
| + | 初期ノード起動時は「bootstrap」を指定 | ||
| < | < | ||
| - | service mysql start --wsrep_cluster_address=gcomm: | + | [root@db01 ~]# /etc/init.d/mysql bootstrap |
| - | </code> | + | Bootstrapping the cluster.. Starting MySQL.. SUCCESS! |
| - | mysql | + | [root@db02 ~]# / |
| + | Starting MySQL.. SUCCESS! | ||
| + | [root@db03 ~]# / | ||
| + | Starting MySQL.. SUCCESS! | ||
| + | </ | ||
| + | |||
| + | ==== Check statuses ==== | ||
| < | < | ||
| + | # mysql -h db03 | ||
| + | |||
| MariaDB [(none)]> | MariaDB [(none)]> | ||
| 行 56: | 行 89: | ||
| | wsrep_cert_index_size | | wsrep_cert_index_size | ||
| | wsrep_causal_reads | | wsrep_causal_reads | ||
| - | | wsrep_incoming_addresses | + | | wsrep_incoming_addresses |
| ~省略~ | ~省略~ | ||
| +----------------------------+--------------------------------------+ | +----------------------------+--------------------------------------+ | ||
| 40 rows in set (0.00 sec) | 40 rows in set (0.00 sec) | ||
| </ | </ | ||
mariadb/galera.1439171509.txt.gz · 最終更新: 2025/02/16 13:50 (外部編集)
