mysql error :Could not find first log file name in binary log index file?

这几天部署智能DNS,因为涉及到了mysql replaction,版本都是5.1.51.其中第一台因为第一次安装了5.0.90。所以在安装5.1.51后,slave服务器上,总是包日志不对。google后,得知要么是日志错误?要么是mysqlbinlog版本不对!回想到安装过5.0.90 ,并且运行了几天,应该产生了binlog,删除其bin日志。


slave上
 

rm -f binlog/* && rm -f relaylog/* && rm -f master.info


master上

rm -f binlog/* && rm -f relaylog/* && rm -f master.info
service mysqld restart


slave上
 

slave start;或者重启mysql


[separator]
但是,日志又出现下列错误信息。


解决方法是:

查看master信息


在slave上执行;
 

mysql> slave stop
-> ;
Query OK, 0 rows affected (0.00 sec)
mysql> change master to Master_Log_File='binlog.000002',Master_Log_Pos=106;
Query OK, 0 rows affected (0.03 sec)
mysql> slave start;
Query OK, 0 rows affected (0.00 sec)
mysql> show slave status\G;
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.13.15
Master_User: slave_user
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: binlog.000002
Read_Master_Log_Pos: 106
Relay_Log_File: relaylog.000002
Relay_Log_Pos: 248
Relay_Master_Log_File: binlog.000002
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB: cdn
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 106
Relay_Log_Space: 396
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
1 row in set (0.00 sec)
ERROR:
No query specified

你可能感兴趣的:(log,error,name,binary,first)