mysql 5.7.5组复制配置问题。

时间:2021-06-02 18:36:07

I want to try mysql 5.7.5 group replication over corosync. And the corosync is running correctly.

我想尝试一下在corosync上的mysql 5.7.5组复制。corosync运行正常。

I followed the steps on http://mysqlhighavailability.com/getting-started-with-mysql-group-replication/#comment-2058 to configure mysql-group-replication on two host, but only the node which first starts gcs_replication can be online, the other one is offline.

我遵循了http://mysqlhighavailability.com/getting-startedwith-mysql -group-replication/# comm-2058,在两个主机上配置mysql-group-replication,但只有第一个启动gcs_replication的节点可以在线,而另一个则脱线。

When the second node starts gcs_replication, we got the logging info from mysql server side.

当第二个节点启动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'

The article said, "By default, these settings are configured to use “root” with no associated password. " Does this mean the client should login without password? But when I login the client with ./bin/mysql -u root -h 127.0.0.1 -P 13001 --prompt='server1>', it shows ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO), so i added "-p".

文章说,“默认情况下,这些设置被配置为使用没有相关密码的“root”。这是否意味着客户端应该在没有密码的情况下登录?但是当我用./bin/mysql -u root - h127.0.0.1 - p13001——提示='server1>'时,它会显示错误1045(28000):用户root用户的root用户无法访问@'localhost'(使用密码:NO),所以我添加了“-P”。

Similar issue, when I start the server, it shows [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!, so I add "-u root"

类似的问题,当我启动服务器时,它显示[错误]致命错误:请阅读手册中的“安全”部分,以找出如何以root身份运行mysqld !所以我加上-u根

I don't know weather these modifications are the reason resulting in the failure configuration. Does anyone have any experience of mysql-group-replication to solve this problem?

我不知道这些修改是导致失败配置的原因。有没有人有过mysql-group-replication的经验来解决这个问题?

2 个解决方案

#1


0  

The article said, "By default, these settings are configured to use “root” with no associated password. " Does this mean the client should login without password? But when I login the client with ./bin/mysql -u root -h 127.0.0.1 -P 13001 --prompt='server1>', it shows ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO), so i added "-p".

文章说,“默认情况下,这些设置被配置为使用没有相关密码的“root”。这是否意味着客户端应该在没有密码的情况下登录?但是当我用./bin/mysql -u root - h127.0.0.1 - p13001——提示='server1>'时,它会显示错误1045(28000):用户root用户的root用户无法访问@'localhost'(使用密码:NO),所以我添加了“-P”。

Similiar issue, when I start the server, it shows [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!, so I add "-u root"

Similiar问题,当我启动服务器时,它显示[错误]致命错误:请阅读手册中的“安全”部分,以找出如何以root身份运行mysqld !所以我加上-u根

Not the client. The article refers to the connection credentials that recovery tries to use by default to contact other servers. It will try to contact other servers with the user root and no password, but in most cases, yes, the server will not have a unprotected root user so these options must be changed. It does not means that there is such a connection in the server that you can use.

没有客户端。本文引用了恢复试图通过默认方式与其他服务器联系的连接凭据。它将尝试使用用户根和没有密码来联系其他服务器,但是在大多数情况下,是的,服务器不会有一个不受保护的根用户,所以必须更改这些选项。这并不意味着在服务器中可以使用这样的连接。

Anyway, the problem shown in the log seems to be something related to the relay log creation, hence, it should not be related to the credentials.

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

In my opinion you should try to use the newer version currently on labs release and see if the current improvements with the use of replication channels help you. http://labs.mysql.com/

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

#2


0  

I think I had similar problems regarding my relay files.
I simply did a reset slave then restarted with start group_replication.

我想我的中继文件也有类似的问题。我只是做了一个重置的奴隶,然后重新启动,开始group_replication。

#1


0  

The article said, "By default, these settings are configured to use “root” with no associated password. " Does this mean the client should login without password? But when I login the client with ./bin/mysql -u root -h 127.0.0.1 -P 13001 --prompt='server1>', it shows ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO), so i added "-p".

文章说,“默认情况下,这些设置被配置为使用没有相关密码的“root”。这是否意味着客户端应该在没有密码的情况下登录?但是当我用./bin/mysql -u root - h127.0.0.1 - p13001——提示='server1>'时,它会显示错误1045(28000):用户root用户的root用户无法访问@'localhost'(使用密码:NO),所以我添加了“-P”。

Similiar issue, when I start the server, it shows [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!, so I add "-u root"

Similiar问题,当我启动服务器时,它显示[错误]致命错误:请阅读手册中的“安全”部分,以找出如何以root身份运行mysqld !所以我加上-u根

Not the client. The article refers to the connection credentials that recovery tries to use by default to contact other servers. It will try to contact other servers with the user root and no password, but in most cases, yes, the server will not have a unprotected root user so these options must be changed. It does not means that there is such a connection in the server that you can use.

没有客户端。本文引用了恢复试图通过默认方式与其他服务器联系的连接凭据。它将尝试使用用户根和没有密码来联系其他服务器,但是在大多数情况下,是的,服务器不会有一个不受保护的根用户,所以必须更改这些选项。这并不意味着在服务器中可以使用这样的连接。

Anyway, the problem shown in the log seems to be something related to the relay log creation, hence, it should not be related to the credentials.

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

In my opinion you should try to use the newer version currently on labs release and see if the current improvements with the use of replication channels help you. http://labs.mysql.com/

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

#2


0  

I think I had similar problems regarding my relay files.
I simply did a reset slave then restarted with start group_replication.

我想我的中继文件也有类似的问题。我只是做了一个重置的奴隶,然后重新启动,开始group_replication。