我想通过 corosync 尝试 mysql 5.7.5 组复制。并且 corosync 运行正常。
我按照http://mysqlhighavailability.com/getting-started-with-mysql-group-replication/#comment-2058上的步骤在两台主机上配置 mysql-group-replication,但只有首先启动 gcs_replication 的节点可以在线,另一个离线。
当第二个节点启动 gcs_replication 时,我们从 mysql 服务器端获取了日志信息。
[ERROR] Failed to open the relay log './gcs_recovery.000001' (relay_log_pos 4).
[ERROR] Could not find target log file mentioned in relay log info in the index file './gcs_recovery.index' during relay log initialization.
[ERROR] Plugin gcs_replication_plugin reported: '[Recovery:] Failed to setup the donor connection (relay log) metadata container.'
[ERROR] Plugin gcs_replication_plugin reported: '[Recovery:] Error when configuring the connection to the donor.'
[Note] Plugin gcs_replication_plugin reported: '[Recovery:] Retrying connection with another donor. Attempt 1/1'
[ERROR] Failed to open the relay log './gcs_recovery.000001' (relay_log_pos 4).
[ERROR] Could not find target log file mentioned in relay log info in the index file './gcs_recovery.index' during relay log initialization.
[ERROR] Plugin gcs_replication_plugin reported: '[Recovery:] Failed to setup the donor connection (relay log) metadata container.'
[ERROR] Plugin gcs_replication_plugin reported: '[Recovery:] Error when configuring the connection to the donor.'
[ERROR] Plugin gcs_replication_plugin reported: '[Recovery:] Maximum number of retries when trying to connect to a donor reached. Aborting recovery.'
2015-02-17T18:39:25.119836Z 0 [Note] Plugin gcs_replication_plugin reported: '[Recovery:] Marking view change with view_id 13'
文章说,“默认情况下,这些设置被配置为使用没有关联密码的“root”。这是否意味着客户端应该没有密码登录?但是当我用 登录客户端时./bin/mysql -u root -h 127.0.0.1 -P 13001 --prompt='server1>'
,它会显示ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
,所以我添加了“-p”。
类似的问题,当我启动服务器时,它显示[ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
,所以我添加“-u root”
我不知道这些修改是导致配置失败的原因。有没有人有 mysql-group-replication 的经验来解决这个问题?