List:General Discussion« Previous MessageNext Message »
From:Thomas Spahni Date:March 4 2009 12:25pm
Subject:Finding replicated database
View as plain text  
Hi

I'm stuck with the following problem:

SLAVE has a bunch of databases of which one or two are replicated from 
MASTER.

I'm writing a shell script to be run by an ordinary user on SLAVE. This 
script should know which of the databases on SLAVE are replicated.

Configuration: MASTER has --binlog-do-db rules. These determine what goes 
to binlog and will be replicated by SLAVE. SLAVE has no --replicate-do-db 
rules.

On SLAVE I can find who the master is (SHOW SLAVE STATUS; will tell) but I 
can see no way to find what databases are logged by MASTER.

User on SLAVE has no access to the replication user password on SLAVE and 
has no access to MASTER (otherwise mysql -h MASTER -e "SHOW MASTER 
STATUS," would do the trick).

Any other way to make the SLAVE tell me what is's replicating?

TIA
Thomas Spahni
Thread
Finding replicated databaseThomas Spahni4 Mar
  • Re: Finding replicated databaseBaron Schwartz4 Mar
    • Re: Finding replicated databaseAtle Veka6 Mar
      • Re: Finding replicated databaseBaron Schwartz7 Mar
        • Re: Finding replicated databaseJim Lyons7 Mar