MySQL Galera集群无法启动第一个节点

时间:2018-02-09 07:56:08

标签: mysql ubuntu-16.04 galera

我正在使用Ubuntu 16.04并通过AWS中的apt-get安装MySQL版本5.7。

之后,我通过official website使用apt-get install galera-3 galera-arbitrator-3 mysql-wsrep-5.6

跟踪{{3}}中的文档,设法将MySQL升级到Galera群集

之后我将文件/etc/mysql/conf.d/galera.cnf配置为:

[mysqld]
binlog_format=ROW
default-storage-engine=innodb
innodb_autoinc_lock_mode=2
bind-address=0.0.0.0

# Galera Provider Configuration
wsrep_on=ON
wsrep_provider=/usr/lib/galera/libgalera_smm.so

# Galera Cluster Configuration
wsrep_cluster_name="test_cluster"
wsrep_cluster_address="gcomm://this_node_ip,second_ip,third_ip"

# Galera Synchronization Configuration
wsrep_sst_method=rsync

# Galera Node Configuration
wsrep_node_address="this_node_ip"
wsrep_node_name="this_node_name"

对其他2个节点(使用它自己的IP地址)重复上述步骤。并为每个节点使用以下命令sudo service mysql stop停止mysql。

在第一个节点中,我尝试使用以下命令开始:

sudo service mysql start --wsrep-new-cluster

但它返回:Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.

systemctl status mysql.service中,它说:

● mysql.service - LSB: start and stop MySQL
   Loaded: loaded (/etc/init.d/mysql; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2018-02-09 15:53:16 +08; 33s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 6264 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)

Feb 09 15:53:15 systemd[1]: Starting LSB: start and stop MySQL...
Feb 09 15:53:15 mysql[6264]: Starting MySQL
Feb 09 15:53:15 mysql[6264]: .180209 15:53:15 mysqld_safe Can't log to error log and syslog at the same time.  Remove all --log-error configuration options for --syslog to take effect.
Feb 09 15:53:15 mysql[6264]: 180209 15:53:15 mysqld_safe Directory '/var/run/mysqld' for UNIX socket file don't exists.
Feb 09 15:53:16 mysql[6264]:  * The server quit without updating PID file (/var/run/mysqld/mysqld.pid).
Feb 09 15:53:16 systemd[1]: mysql.service: Control process exited, code=exited status=1
Feb 09 15:53:16 systemd[1]: Failed to start LSB: start and stop MySQL.
Feb 09 15:53:16 systemd[1]: mysql.service: Unit entered failed state.
Feb 09 15:53:16 systemd[1]: mysql.service: Failed with result 'exit-code'.

希望这些信息有所帮助。

0 个答案:

没有答案