Mysql复制数据未更新但日志已更新

时间:2012-07-31 14:08:14

标签: mysql replication

以下是我所做的步骤。

我正在将mysql 5.0.95复制为master,将5.5复制为slave。我正在使用Linux操作系统。我的数据库引擎是InnoDBenter代码

我用

设置了主人
/etc/my.cnf
**#mysql Server setup**
server-id=1
bind-address = 192.168.1.41
innodb_flush_log_at_trx_commit=1
sync_binlog=1
log-bin = /var/log/mysql/mysql-bin.log
binlog-do-db=my_db

我用

设置了奴隶
/etc/my.cnf
**#mysql replication client setup**
server-id=5
master-host=192.168.1.41
master-user=web_master
master-password=webmaster
master-connect-retry=60
replicate-do-db=dev_my_db
log-slave-updates

我已授予主人许可

GRANT SUPER,REPLICATION CLIENT,REPLICATION SLAVE,RELOAD ON *.* TO 'web_master'@'192.168.1.41' identified by 'webmaster';

我在奴隶

上设置了更改主位置和位置
CHANGE MASTER TO MASTER_HOST='192.168.1.41', MASTER_USER='web_master', MASTER_PASSWORD='webmaster', MASTER_LOG_FILE='mysql-bin.00002', MASTER_LOG_POS=107;

我做了2次插入和更新并记录了我的查询

并将我的主人身份检查为

mysql> SHOW master STATUS\G

File: mysql-bin.000004
Position: 13790
Binlog_Do_DB: my_db
Binlog_Ignore_DB: 
1 row in set (0.00 sec)

我将我的奴隶和奴隶身份视为

mysql> SHOW SLAVE STATUS \G;
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.1.41
Master_User: web_master
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000004
Read_Master_Log_Pos: 13790
Relay_Log_File: mysqld-relay-bin.000007
Relay_Log_Pos: 244
Relay_Master_Log_File: mysql-bin.000004
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB: dev_CHGV2_dbo
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: 13790
Relay_Log_Space: 401
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: 
Replicate_Ignore_Server_Ids: 
Master_Server_Id: 4
1 row in set (0.00 sec)
ERROR: 
No query specified

我可以看到bin日志在slave上更新,我无法弄清楚导致问题的原因。由于我对master的更新没有在slave上复制。 任何人都建议我错过了什么吗?

0 个答案:

没有答案
相关问题