我在VMware VM上安装了ubuntu 16.04。然后我从mariadb网站添加了回购,我安装了最新版本的mariadb 10.1。
安装工作正常
然后我创建了一个文件
sudo nano /etc/mysql/conf.d/cluster.cnf
以下
[mysqld]
# Cluster node configurations
wsrep_cluster_address="gcomm://20.0.1.51"
wsrep_node_address="20.0.1.51"
innodb_buffer_pool_size=800M
# Mandatory settings to enable Galera
wsrep_on=ON
wsrep_provider=/usr/lib/galera/libgalera_smm.so
binlog_format=ROW
default-storage-engine=InnoDB
innodb_autoinc_lock_mode=2
innodb_doublewrite=1
query_cache_size=0
bind-address=0.0.0.0
# Galera synchronisation configuration
wsrep_sst_method=rsync
我只想引导第一个节点,然后添加新节点
所以我跑
sudo service mysql bootstrap
但是我收到了这个错误
Jul 03 02:38:07 db1 mysqld[14779]: at gcomm/src/pc.cpp:connect():162
Jul 03 02:38:07 db1 mysqld[14779]: 2016-07-03 2:38:07 140418873596160 [ERROR] WSREP: gcs/src/gcs_core.cpp:gcs_core_open():208: Failed to open backend connection: -110 (Connection timed ou
Jul 03 02:38:07 db1 mysqld[14779]: 2016-07-03 2:38:07 140418873596160 [ERROR] WSREP: gcs/src/gcs.cpp:gcs_open():1379: Failed to open channel 'my_wsrep_cluster' at 'gcomm://20.0.1.51': -11
Jul 03 02:38:07 db1 mysqld[14779]: 2016-07-03 2:38:07 140418873596160 [ERROR] WSREP: gcs connect failed: Connection timed out
Jul 03 02:38:07 db1 mysqld[14779]: 2016-07-03 2:38:07 140418873596160 [ERROR] WSREP: wsrep::connect(gcomm://20.0.1.51) failed: 7
Jul 03 02:38:07 db1 mysqld[14779]: 2016-07-03 2:38:07 140418873596160 [ERROR] Aborting
Jul 03 02:38:08 db1 systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Jul 03 02:38:08 db1 systemd[1]: Failed to start MariaDB database server.
Jul 03 02:38:08 db1 systemd[1]: mariadb.service: Unit entered failed state.
Jul 03 02:38:08 db1 systemd[1]: mariadb.service: Failed with result 'exit-code'.
我做错了什么?
答案 0 :(得分:0)
它是系统化的东西。在具有systemd的系统上,应使用 galera_new_cluster 来引导新群集。 https://mariadb.com/kb/en/mariadb/systemd/