- 论坛徽章:
- 8
|
昨天搞了一晚上主从还是不一致,都重装了mysql也不行,以前搭建主从都很简单的怎么这次老是不成功。- mysql> show slave status\G;
- *************************** 1. row ***************************
- Slave_IO_State:
- Master_Host: 192.168.20.130
- Master_User: rep
- Master_Port: 3306
- Connect_Retry: 60
- Master_Log_File: mysql-bin.000012
- Read_Master_Log_Pos: 107
- Relay_Log_File: relay-log.000001
- Relay_Log_Pos: 4
- Relay_Master_Log_File: mysql-bin.000012
- Slave_IO_Running: No
- Slave_SQL_Running: Yes
- Replicate_Do_DB: test
- Replicate_Ignore_DB:
- Replicate_Do_Table:
- Replicate_Ignore_Table:
- Replicate_Wild_Do_Table:
- Replicate_Wild_Ignore_Table:
- Last_Errno: 0
- Last_Error:
- Skip_Counter: 1
- Exec_Master_Log_Pos: 107
- Relay_Log_Space: 407
- 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: NULL
- Master_SSL_Verify_Server_Cert: No
- Last_IO_Errno: 1236
- Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'
- Last_SQL_Errno: 0
- Last_SQL_Error:
- Replicate_Ignore_Server_Ids:
- Master_Server_Id: 15
- 1 row in set (0.00 sec)
- ERROR:
- No query specified
复制代码 Master的my.cnf如下:从的my.cnf配置文件如下:主的配置:
GRANT REPLICATION SLAVE ON *.* TO 'rep'@'%' IDENTIFIED BY '123456';
show master status;
从的配置如下:
change master to master_host='192.168.20.130',master_user='rep',master_password='123456',master_log_file='mysql-bin.000012',master_log_pos=107;
我flushlog也不行,重启了也不行。都是新装数据库。还有log_file,log_pos 都对,网络都通,授权账号也正确 。 |
|