Chinaunix

标题: mysql 主备同步报错 [打印本页]

作者: litianshu    时间: 2009-11-26 12:04
标题: mysql 主备同步报错
Could not initialize master info structure; more error messages can be found in the MySQL error log
作者: cenalulu    时间: 2009-11-26 12:33
master info 被改过了?

先看一下mysql error log里有没有更详细的报错吧
作者: litianshu    时间: 2009-11-26 12:41
日志 Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=backup-relay-bin' to avoid this problem
作者: cenalulu    时间: 2009-11-26 12:50
不是这句。。。稍微贴全一点
作者: litianshu    时间: 2009-11-26 14:12
Error counting relay log space
091125 17:05:08 [ERROR] Error reading master configuration
091125 17:10:24 [ERROR] log ./backup-relay-bin.000012 listed in the index, but failed to stat
091125 17:10:24 [ERROR] Error counting relay log space
091125 17:23:24 [ERROR] Error reading master configuration
091125 18:07:52 [ERROR] Error reading master configuration
091125 18:08:18 [ERROR] Error reading master configuration
091125 18:11:15 [ERROR] Error reading master configuration
091126 11:05:35 [Note] /usr/local/mysql/libexec/mysqld: Normal shutdown

091126 11:05:35 [Note] Event Scheduler: Purging the queue. 0 events
091126 11:05:37 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

091126 11:05:37 mysqld_safe mysqld from pid file /usr/local/mysql/var/backup.pid ended
091126 11:05:58 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
091126 11:05:58 [Note] Event Scheduler: Loaded 0 events
091126 11:05:58 [Note] /usr/local/mysql/libexec/mysqld: ready for connections.
Version: '5.1.34-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
091126 11:07:04 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=backup-relay-bin' to avoid this problem.
091126 11:07:04 [ERROR] Failed to open log (file './backup-relay-bin.000010', errno 2)
091126 11:07:04 [ERROR] Failed to open the relay log 'FIRST' (relay_log_pos 4)
091126 11:07:04 [ERROR] Could not open log file
091126 11:09:51 [ERROR] Error reading master configuration
091126 11:25:29 [ERROR] Failed to open log (file './backup-relay-bin.000010', errno 2)
091126 11:25:29 [ERROR] Failed to open the relay log 'FIRST' (relay_log_pos 4)
091126 11:25:29 [ERROR] Could not open log file
091126 11:51:29 [Note] /usr/local/mysql/libexec/mysqld: Normal shutdown

091126 11:51:29 [Note] Event Scheduler: Purging the queue. 0 events
091126 11:51:31 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

091126 11:51:31 mysqld_safe mysqld from pid file /usr/local/mysql/var/backup.pid ended
091126 11:51:48 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
091126 11:51:48 [Note] Event Scheduler: Loaded 0 events
091126 11:51:48 [Note] /usr/local/mysql/libexec/mysqld: ready for connections.
Version: '5.1.34-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
091126 12:02:30 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=backup-relay-bin' to avoid this problem.
091126 12:02:30 [ERROR] Error reading slave log configuration
作者: cenalulu    时间: 2009-11-26 15:08
你是做了一个备份恢复操作?
先看一下你所有log的权限是否正确,然后看一下你的log名跟hostname是否一致?
作者: Coolriver    时间: 2009-11-26 15:54

  1. > perror 2
  2. OS error code   2:  No such file or directory
复制代码

./backup-relay-bin.000010

你做了什么改变让MySQL找不到中继日值了?
作者: justin033    时间: 2009-11-26 18:49
091126 12:02:30 [ERROR] Error reading slave log configuration


检查在slave上masters相关的配置文件,读写权限等




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2