Rutvij Kothari Rutvij Kothari - 3 years ago 358
MySQL Question

Slave isn't writing any data into the table in mysql master slave replication

I am having a difficult time in setting Master-Slave configuration.

Master Database runs on Ubuntu( Amazon AWS instance) and successfully set-up master replication.

I have localhost as a Slave Server. (Windows Machine).

Snapshot of Master Database
Master Replication

Master database has record
Master Replication has 34 tables

Binar Log Information
Binary Log

Process List on Master Replication
enter image description here

Status of Master Replication
enter image description here

I debug master replication which works okay I guess.

On the Salve Side:
Status on Slave Side
Status on Slave Replication

Even though MASTER_LOG and MASTER_POS are synced but data doesn't.

Currently, I have 0 table on Slave side and 34 tables on Master side.

Tables on Slave side
enter image description here

I am open to any suggestion or any reference do you have.

I spend an entire day and trying to find what I did wrong.
I want to Sync my Local database with a database hosted on remote-server.

Update: Thigs I did to debug the Master-Slave Replication

  1. Checked Master Database is up and running.

  2. Master Status and Connected Slaves. [Which includes unique id for
    each server.]

  3. Slave database is up and running [Including Slave IO Thread and
    SQL thread is running.]

These three steps ensure that Master-Slave replication is up and running without any problem.

Handling Data Sync Problem

  1. Created/update/delete data in the master database to check
    whether data is sync on a server or not.

  2. Checked Binary Log [Specifically I checked the file size. If I
    entered data file size will continuously increasing.]

Thanks in advance.

Answer Source

we had similar problem - read more about gotchas in "binlog-do-db" and "replication-do-db" and related parameters. Here is a big problem with crossdatabase references. At the and we had to remove these settings limiting replication.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download