On Thu, May 14, 2009 at 04:45:44PM -0700, Scott Haneda wrote:

> >It's true that initial mysql replication setup is a bit fiddly, but  
> >once you've done it once or twice it's not so hard.
> 
> I have it set up and working in test.  I will redo it again once I get  
> a better handle on it.  I am still a little confused on one aspect.   
> In the mysql sample cfg file, the section that has:
> #Replication Slave there is a very clear "OR" to use either #1 OR #2.
> 
> I did the suggestions of #2, issuing
>       #    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
>       #    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
> on the slave.

Sounds fine.

> I also, in section [mysqld]
> # Begin slave config 05/14/2009
> server-id = 2
> master-host = ip.add.re.ss
> master-user = user-replicate
> master-password = xxxxxx
> master-port = 3306
> # End slave config

No. not necessary as the information is stored in the master info file.

> Am I correct in that this is not needed.  I know I for certain need  
> server_id, but is that all I need, and I have redundant data?  I  
> figure also better to not have raw user and pass in a cnf file if it  
> is not needed.

The server-id IS needed and MUST be different on each server.

...

>      log-bin = /usr/local/mysql/var/bin.log

This can be in the datadir just fine. If you server is very busy with updates
some people recommend putting this on a different filesystem to spread the I/O.
Depending on your setup that may or may not help. If you don't need it now
don't bother.

>      log-slave-updates

Only needed if you have a daisy-chained replication environment you need this.
Without it the salve will only store the commands run on the slave itself
thus missing the commands run on the original master. If you want to make a
slave from the SLAVE server then without this option you won't pick up 
all the replication commands.

>      auto_increment_increment = 10

Unless you are running master-master replication ignore this.
>       
>      replicate-do-db = somedbname1
>      replicate-do-db = somedbname2

required if you don't want to replicate all the dbs on the server.

Simon

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