Re: replication of databases

2008-12-23 Thread Bryan Irvine
On Mon, Dec 22, 2008 at 6:40 PM, Baron Schwartz ba...@xaprb.com wrote:
 Right.  Unless you have some other settings (binlog-do-db or
 binlog-ignore-db on the master?) that are interfering

 You saw this ^ right?

 on master:
 mysql show master status;
 +--+--+--+--+
 | File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
 +--+--+--+--+
 | mysql-bin.000122 |   98 | mysql|  |
 +--+--+--+--+
 1 row in set (0.00 sec)

 You need to read up on what binlog_do_db means.  And you shouldn't use
 it.  It is the problem.


Indeed it was a gap in my understanding.  That did the trick!  Many thanks!!

-Bryan

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



Re: replication of databases

2008-12-22 Thread Bryan Irvine
On Sun, Dec 21, 2008 at 8:35 AM, Baron Schwartz ba...@xaprb.com wrote:
 Hi Bryan,

 On Wed, Dec 17, 2008 at 5:35 PM, Bryan Irvine sparcta...@gmail.com wrote:
 I've got a master-master set up and I'm trying to figure out the best
 way to add new databases to the cluster.  I've not set anything for
 the replica-do-db which my understanding means it will sync everything
 correct?

 Right.  Unless you have some other settings (binlog-do-db or
 binlog-ignore-db on the master?) that are interfering.

 So if I create a new DB is the create command supposed to replicated
 as well? (it's not working for me if it is).

 Yes, it should be working.  What do you mean by isn't working?  How
 did you test it?

mysqladmin create newdb on master then on slave '\r newdb

 Did you check to be sure the slave is running?  SHOW SLAVE STATUS
 should show you.

on master:
mysql show master status;
+--+--+--+--+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+--+--+--+--+
| mysql-bin.000122 |   98 | mysql|  |
+--+--+--+--+
1 row in set (0.00 sec)

mysqladmin -p create newdb


on slave:
mysql show slave status \G
*** 1. row ***
 Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.15.20
Master_User: root
Master_Port: 3306
  Connect_Retry: 60
Master_Log_File: mysql-bin.000122
Read_Master_Log_Pos: 98
 Relay_Log_File: slave-relay.000133
  Relay_Log_Pos: 235
  Relay_Master_Log_File: mysql-bin.000122
   Slave_IO_Running: Yes
  Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
 Replicate_Do_Table:
 Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
 Last_Errno: 0
 Last_Error:
   Skip_Counter: 0
Exec_Master_Log_Pos: 98
Relay_Log_Space: 235
Until_Condition: None
 Until_Log_File:
  Until_Log_Pos: 0
 Master_SSL_Allowed: No
 Master_SSL_CA_File:
 Master_SSL_CA_Path:
Master_SSL_Cert:
  Master_SSL_Cipher:
 Master_SSL_Key:
  Seconds_Behind_Master: 0
1 row in set (0.00 sec)


mysql \r newdb
ERROR 1049 (42000): Unknown database 'newdb'

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



Re: replication of databases

2008-12-22 Thread Baron Schwartz
 Right.  Unless you have some other settings (binlog-do-db or
 binlog-ignore-db on the master?) that are interfering

You saw this ^ right?

 on master:
 mysql show master status;
 +--+--+--+--+
 | File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
 +--+--+--+--+
 | mysql-bin.000122 |   98 | mysql|  |
 +--+--+--+--+
 1 row in set (0.00 sec)

You need to read up on what binlog_do_db means.  And you shouldn't use
it.  It is the problem.

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



RE: replication of databases

2008-12-22 Thread Raghani, Sonal (IE10)
Hi,

In your case replication will reflect only the changes done by selecting
the default db as mysql as the binlog_do_db parameter is set to mysql.

Regards
Sonal
-Original Message-
From: baron.schwa...@gmail.com [mailto:baron.schwa...@gmail.com] On
Behalf Of Baron Schwartz
Sent: Tuesday, December 23, 2008 8:11 AM
To: Bryan Irvine
Cc: mysql@lists.mysql.com
Subject: Re: replication of databases

 Right.  Unless you have some other settings (binlog-do-db or
 binlog-ignore-db on the master?) that are interfering

You saw this ^ right?

 on master:
 mysql show master status;
 +--+--+--+--+
 | File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
 +--+--+--+--+
 | mysql-bin.000122 |   98 | mysql|  |
 +--+--+--+--+
 1 row in set (0.00 sec)

You need to read up on what binlog_do_db means.  And you shouldn't use
it.  It is the problem.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/mysql?unsub=sonal.ragh...@honeywell.com


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



Re: replication of databases

2008-12-21 Thread Baron Schwartz
Hi Bryan,

On Wed, Dec 17, 2008 at 5:35 PM, Bryan Irvine sparcta...@gmail.com wrote:
 I've got a master-master set up and I'm trying to figure out the best
 way to add new databases to the cluster.  I've not set anything for
 the replica-do-db which my understanding means it will sync everything
 correct?

Right.  Unless you have some other settings (binlog-do-db or
binlog-ignore-db on the master?) that are interfering.

 So if I create a new DB is the create command supposed to replicated
 as well? (it's not working for me if it is).

Yes, it should be working.  What do you mean by isn't working?  How
did you test it?

Did you check to be sure the slave is running?  SHOW SLAVE STATUS
should show you.

-- 
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



replication of databases

2008-12-17 Thread Bryan Irvine
I've got a master-master set up and I'm trying to figure out the best
way to add new databases to the cluster.  I've not set anything for
the replica-do-db which my understanding means it will sync everything
correct?

So if I create a new DB is the create command supposed to replicated
as well? (it's not working for me if it is).

I've read the docs but didn't find what I was looking for, apologies
if is this covered elsewhere.

-Bryan

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