Hi,

On Wed, Mar 4, 2009 at 7:25 AM, Thomas Spahni <t...@lawbiz.ch> wrote:
> 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?

No.  But I would recommend removing binlog-do-db and using
replicate-wild-do-table=<mydb>.% on the slave instead.  The
binlog-do-db approach has many pitfalls anyway, and is likely to burn
you at some point, e.g. get the slave out of sync with the master.
The bonus of my suggestion is that you'll be able to see from SHOW
SLAVE STATUS what's being replicated.

-- 
Baron Schwartz, Director of Consulting, Percona Inc.
Our Blog: http://www.mysqlperformanceblog.com/
Our Services: http://www.percona.com/services.html

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to