Mysql 主主复制

发布于 2024-09-28 13:43:12 字数 964 浏览 3 评论 0原文

服务器1:xxx.xxx.xxx.xxx

server-id=1 
binlog-do-db=sample 
master-host = xxx.xxx.xxx.xxx 
master-user = someuser 
master-password = somepassword 
master-connect-retry = 60 
relay-log = /var/lib/mysql/slave-relay.log 
relay-log-index = /var/lib/mysql/slave-relay-log.index 

服务器2:xxx.xxx.xxx.xxx

server-id=2 
binlog-do-db = sample 
master-host = xxx.xxx.xxx.xxx 
master-user = someuser 
master-password = somepassword 
master-connect-retry = 60 
relay-log = /var/lib/mysql/slave-relay.log 
relay-log-index = /var/lib/mysql/slave-relay-log.index 

我已经在2个测试服务器上设置了主主复制配置,我还为我遇到问题的服务器上的mysql 3306打开了端口从属连接我不断收到

以下错误 101021 19:12:23 [错误] 从属 I/O: 连接到主控时出错 '[电子邮件受保护]:3306' - 重试时间: 60 次重试: 86400, Error_code: 1045

服务器 1 具有 mysql 5.0.77,服务器 2 具有 mysql 版本 5.1。 41

Server1: xxx.xxx.xxx.xxx

server-id=1 
binlog-do-db=sample 
master-host = xxx.xxx.xxx.xxx 
master-user = someuser 
master-password = somepassword 
master-connect-retry = 60 
relay-log = /var/lib/mysql/slave-relay.log 
relay-log-index = /var/lib/mysql/slave-relay-log.index 

Server 2: xxx.xxx.xxx.xxx

server-id=2 
binlog-do-db = sample 
master-host = xxx.xxx.xxx.xxx 
master-user = someuser 
master-password = somepassword 
master-connect-retry = 60 
relay-log = /var/lib/mysql/slave-relay.log 
relay-log-index = /var/lib/mysql/slave-relay-log.index 

I have setup the master master replication configuration on 2 test servers, i have also opened ports for both the mysql 3306 on servers i am facing a problem with slave connection I keep getting the

following errors 101021 19:12:23 [ERROR] Slave I/O: error connecting to master '[email protected]:3306' - retry-time: 60 retries: 86400, Error_code: 1045

Sever 1 has mysql 5.0.77 and server 2 has mysql version 5.1.41

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

叫嚣ゝ 2024-10-05 13:43:12

Error_code: 1045 表示您的凭据存在问题。

尝试使用您的复制用户凭据进行连接,例如:

mysql -h host -u your_user -p your_password

请注意,密码不得超过 32 个字符。

Error_code: 1045 means that there is a problem with your credentials.

Try to connect with your replication user credentials like :

mysql -h host -u your_user -p your_password

Note that the password is limited to 32 characters.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文