Problems with MySQL replication setup

596 Views Asked by At

I need some replication advice please. I'm trying to set up the replication of a specific database from one server to another. I'm only doing this internally at the moment, just to observe.

MySQL is reporting that my efforts are correct. However, data altered on the master doesn't appear on the slave.

I can confirm:

  • MySQL servers have unique id's.
  • New user with permissions (all privileges) created on master.
  • The slave is directed (successfully) to the master's IP with credentials.

Here are the reports each servers MySQL reports. Should I be seeing this message if its not going to work?

I just don't know where to go from here.

The master:

File    mysql-bin.000008
Position    107
Binlog_Do_DB    SBGreplication
Binlog_Ignore_DB 

Show connected slaves:

Server ID   Host
2

See slave status table

Variable    Value
Slave_IO_State  Waiting for master to send event
Master_Host 10.0.1.100
Master_User sbgreplication
Master_Port 8889
Connect_Retry   60
Master_Log_File mysql-bin.000008
Read_Master_Log_Pos 107
Relay_Log_File  mysql-relay-bin.000010
Relay_Log_Pos   253
Relay_Master_Log_File   mysql-bin.000008
Slave_IO_Running    Yes
Slave_SQL_Running   Yes
Replicate_Do_DB 
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 107
Relay_Log_Space 409
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
1

There are 1 best solutions below

0
On

There are three things you ought to do :

  • Make sure your master is connectable via network, i.e its listening on network NICs and not just local socket (via my.cnf bind address)
  • try Show Master Status and Show Slave Status on both ends and see results (preferably via phpMyAdmin and not console)
  • Make sure you have started both master and slave.

Keep in mind that if master and slave get out of synch by any means (a single insert fail), The replication would pop errors and stop till it can continue.