Query about mysql replication

By deep.nigade ·
after replication, we see status by following command :

show slave status\G;

in it's output, we have to check following results:



But, if we see


in results
tht means replication is not done correctly ? is it like tht ?

as far as my knowledge, these IO & SQL threads wil run , when we execute any query on Master server .

so if i m not executing any query on Master server.... & getting "NO" in result (of query : show slave status\G on slave server..

then it doesn't mean that there is something wrong in replication steps...

Please Advice !!

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

Depends on which machine you are on

by Tony Hopkinson In reply to Query about mysql replica ...

Slave io should be running on the slave. It connects to the master, looks to see if there is any sql to run and passes it to slave sql.

So both should be running on the slave but that doesn't necessarily mean replication will occur. You might not have enabled replication on anything. The master might be down...

Both threads should be running on any slave.

mysql replication simply queues queries that change the master database. Then the slave picks them up out of the list on the master, runs them on the salve and then gets the master to mark them as replicated.

Don't forget you need a clean start
if you lose say an insert transaction, then an update follows succesfully it will process without error but do nothing beacsue the record doesn't exist on the slave.

I haven't done any of this since version 4, but as soon as I started having problems, I stopped it, backed up the master, restored to the slave and then enabled replication again.

Another thing I set up was a wee perl script to compare the log positions on master and slave and send an alert to the admins if they got too far out of step.

Related Discussions

Related Forums