1

我想通过 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 的经验来解决这个问题?

4

2 回答 2

1

文章说,“默认情况下,这些设置被配置为使用没有关联密码的‘root’。”这是否意味着客户端应该不使用密码登录?但是当我使用 ./bin/mysql -u root -h 127.0.0.1 -P 13001 --prompt='server1>' 登录客户端时,它显示 ERROR 1045 (28000): Access denied for user 'root'@'localhost '(使用密码:否),所以我添加了“-p”。

类似的问题,当我启动服务器时,它显示 [ERROR] Fatal error: Please read the "Security" section of the manual了解如何以root身份运行mysqld!所以我添加了“-u root”

不是客户端。这篇文章提到了恢复尝试默认使用的连接凭据来联系其他服务器。它将尝试使用用户 root 和无密码联系其他服务器,但在大多数情况下,是的,服务器不会有不受保护的 root 用户,因此必须更改这些选项。这并不意味着您可以使用的服务器中有这样的连接。

无论如何,日志中显示的问题似乎与中继日志的创建有关,因此,它不应该与凭据有关。

在我看来,您应该尝试使用目前在实验室发布的较新版本,看看当前使用复制通道的改进是否对您有帮助。 http://labs.mysql.com/

于 2015-04-10T09:50:33.857 回答
1

我想我的中继文件也有类似的问题。
我只是做了一个reset slave然后重新启动start group_replication

于 2017-02-17T10:03:12.443 回答