MySQL Forums
Forum List  »  Replication

Replication Slave status from Master
Posted by: PER JØ'RGENSEN
Date: October 15, 2015 03:59AM

Hi Forum.
I'm running a littel testsetup with MySQL replication.
the setup will be a little tricky in the end - but here's a little explanation:
The MasterDB is onboard A Vessel and collects data from the Vessels Instrument.
in a timeperiod of 3weeks - the 2 weeks will be with normal internet - but the last week its only possible to mail - no replication.

The question is now:
how can I from the master see/determine if the slave is connected?
I'll make a bat script, that test if the Slave is connected to the master:
If the slave is connected - EXit the script
if the slave is not connected - run command FLUSH LOGS;

I've tried to google the command for this and this is where it goes wrong.
As far as I can see the command should be like this:
SELECT COUNT(1) FROM information_schema.processlist WHERE command = 'binlog dump';
But this gives me the same count weather the slave is connected or not:
the returned count from this command is "1" weather the slave is running or not.

How can I from the Master get a boolean value true/false - or 0/1 if the slave is connected or not.

Thanks in advance
P

Options: ReplyQuote


Subject
Views
Written By
Posted
Replication Slave status from Master
1414
October 15, 2015 03:59AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.