服务器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:连接到主站时出错'root@xxx.xxx.xxx.xxx:3306' - 重试时间:60 次重试:86400,错误代码:1045
服务器 1 具有 mysql 5.0.77,服务器 2 具有 mysql 版本 5.1.41