vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| hi... a quick question that i haven't found an answer to. i can use "replicate-do-db=foo" in a my.cnf file for replication, to replicate the master foo db on the slave. but this requires that i use/have a my.cnf set on the slave. is there a way to dynamically set this attribute/parameter within mysql on the fly. i thought it would be possible via "change master to" but didn't find the cmd when looking through the mysql information. basically, i'm going to have multiple databases, on multiple systems, that i'm going to be replicating to a single system. so, for each master server, i'd like to be able to set the databases that i'm going to replicate... thanks |
| |||
| bruce wrote: > hi... > > a quick question that i haven't found an answer to. > > i can use "replicate-do-db=foo" in a my.cnf file for replication, to > replicate the master foo db on the slave. but this requires that i use/have > a my.cnf set on the slave. > > is there a way to dynamically set this attribute/parameter within mysql on > the fly. i thought it would be possible via "change master to" but didn't > find the cmd when looking through the mysql information. > > basically, i'm going to have multiple databases, on multiple systems, that > i'm going to be replicating to a single system. so, for each master server, > i'd like to be able to set the databases that i'm going to replicate... > > thanks > > > Can't do that currently in MySQL. It is called multi-master replication. You can do multi-slave replication which replicates from one master to multiple slaves, but not the other way around. Keith |
| |||
| hi keith... i recognize you can't do multiple masters to a single slave with mysql's replication. but you can setup separate mysql slave dbs that are independent, and that yo can then iteratively walk through each slave/master, one at a time, and then do the sync/update for each one... this essentially gets you the slave/master replication for each server, replicated to the slave db on the system. the result is a bunch of different slave dbs, instead of a single db... however, that didn't get me my answer to my question... so, how can you do a "replicate-do-db" from within the mysql cmd??? in fact, even if i only had a single master, but multiple dbs, i'd still like to know this, given that i might not want to use the my.cnf file... thanks -----Original Message----- From: B. Keith Murphy [mailto:bmurphy@paragon-cs.com] Sent: Tuesday, November 27, 2007 6:31 AM To: bruce; 'mysql list' Subject: Re: mysql replication.... bruce wrote: > hi... > > a quick question that i haven't found an answer to. > > i can use "replicate-do-db=foo" in a my.cnf file for replication, to > replicate the master foo db on the slave. but this requires that i use/have > a my.cnf set on the slave. > > is there a way to dynamically set this attribute/parameter within mysql on > the fly. i thought it would be possible via "change master to" but didn't > find the cmd when looking through the mysql information. > > basically, i'm going to have multiple databases, on multiple systems, that > i'm going to be replicating to a single system. so, for each master server, > i'd like to be able to set the databases that i'm going to replicate... > > thanks > > > Can't do that currently in MySQL. It is called multi-master replication. You can do multi-slave replication which replicates from one master to multiple slaves, but not the other way around. Keith |
| |||
| You can only do that in the my.cnf file. On Nov 27, 2007 9:50 AM, bruce <bedouglas@earthlink.net> wrote: > hi keith... > > i recognize you can't do multiple masters to a single slave with mysql's > replication. > > but you can setup separate mysql slave dbs that are independent, and that yo > can then iteratively walk through each slave/master, one at a time, and then > do the sync/update for each one... this essentially gets you the > slave/master replication for each server, replicated to the slave db on the > system. the result is a bunch of different slave dbs, instead of a single > db... > > however, that didn't get me my answer to my question... > > so, how can you do a "replicate-do-db" from within the mysql cmd??? > > in fact, even if i only had a single master, but multiple dbs, i'd still > like to know this, given that i might not want to use the my.cnf file... > > thanks > > > -----Original Message----- > From: B. Keith Murphy [mailto:bmurphy@paragon-cs.com] > Sent: Tuesday, November 27, 2007 6:31 AM > To: bruce; 'mysql list' > Subject: Re: mysql replication.... > > > bruce wrote: > > hi... > > > > a quick question that i haven't found an answer to. > > > > i can use "replicate-do-db=foo" in a my.cnf file for replication, to > > replicate the master foo db on the slave. but this requires that i > use/have > > a my.cnf set on the slave. > > > > is there a way to dynamically set this attribute/parameter within mysql on > > the fly. i thought it would be possible via "change master to" but didn't > > find the cmd when looking through the mysql information. > > > > basically, i'm going to have multiple databases, on multiple systems, that > > i'm going to be replicating to a single system. so, for each master > server, > > i'd like to be able to set the databases that i'm going to replicate... > > > > thanks > > > > > > > Can't do that currently in MySQL. It is called multi-master > replication. You can do multi-slave replication which replicates from > one master to multiple slaves, but not the other way around. > > Keith > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/mysql?unsub=baron@xaprb.com > > |
| |||
| ok... you guys have convinced me!! my.cnf it is! so, one more question. is there an attribute i can use to run/restart mysql using a given my.cnf file... i can simply have a number of separate my.cnf files, and point to them when i run/restart mysql.. /etc/init.d/mysqld --??? myown.cnf is there an option/attribute for this. thanks -----Original Message----- From: baron.schwartz@gmail.com [mailto:baron.schwartz@gmail.com]On Behalf Of Baron Schwartz Sent: Tuesday, November 27, 2007 6:50 AM To: bruce Cc: B. Keith Murphy; mysql list Subject: Re: mysql replication.... You can only do that in the my.cnf file. On Nov 27, 2007 9:50 AM, bruce <bedouglas@earthlink.net> wrote: > hi keith... > > i recognize you can't do multiple masters to a single slave with mysql's > replication. > > but you can setup separate mysql slave dbs that are independent, and that yo > can then iteratively walk through each slave/master, one at a time, and then > do the sync/update for each one... this essentially gets you the > slave/master replication for each server, replicated to the slave db on the > system. the result is a bunch of different slave dbs, instead of a single > db... > > however, that didn't get me my answer to my question... > > so, how can you do a "replicate-do-db" from within the mysql cmd??? > > in fact, even if i only had a single master, but multiple dbs, i'd still > like to know this, given that i might not want to use the my.cnf file... > > thanks > > > -----Original Message----- > From: B. Keith Murphy [mailto:bmurphy@paragon-cs.com] > Sent: Tuesday, November 27, 2007 6:31 AM > To: bruce; 'mysql list' > Subject: Re: mysql replication.... > > > bruce wrote: > > hi... > > > > a quick question that i haven't found an answer to. > > > > i can use "replicate-do-db=foo" in a my.cnf file for replication, to > > replicate the master foo db on the slave. but this requires that i > use/have > > a my.cnf set on the slave. > > > > is there a way to dynamically set this attribute/parameter within mysql on > > the fly. i thought it would be possible via "change master to" but didn't > > find the cmd when looking through the mysql information. > > > > basically, i'm going to have multiple databases, on multiple systems, that > > i'm going to be replicating to a single system. so, for each master > server, > > i'd like to be able to set the databases that i'm going to replicate... > > > > thanks > > > > > > > Can't do that currently in MySQL. It is called multi-master > replication. You can do multi-slave replication which replicates from > one master to multiple slaves, but not the other way around. > > Keith > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/mysql?unsub=baron@xaprb.com > > |
| ||||
| The relevant options are... baron@tigger ~ $ mysqld --help --verbose | grep default --no-defaults Don't read default options from any options file --defaults-file=# Only read default options from the given file # --defaults-extra-file=# Read this file after the global files are read I would suggest using the --defaults-extra-file to refer to a defaults file that has only the settings you want. But this is roughly equivalent to restarting with the --replicate-XXX options manually specified, no? You might also look into the Instance Manager, which could give you some more ideas. I'm being vague because I don't know what I'm talking about :-) On Nov 27, 2007 10:19 AM, bruce <bedouglas@earthlink.net> wrote: > ok... > > you guys have convinced me!! my.cnf it is! > > so, one more question. is there an attribute i can use to run/restart mysql > using a given my.cnf file... i can simply have a number of separate my.cnf > files, and point to them when i run/restart mysql.. > > /etc/init.d/mysqld --??? myown.cnf > > is there an option/attribute for this. > > thanks > > > > -----Original Message----- > From: baron.schwartz@gmail.com [mailto:baron.schwartz@gmail.com]On > Behalf Of Baron Schwartz > Sent: Tuesday, November 27, 2007 6:50 AM > To: bruce > Cc: B. Keith Murphy; mysql list > Subject: Re: mysql replication.... > > > You can only do that in the my.cnf file. > > On Nov 27, 2007 9:50 AM, bruce <bedouglas@earthlink.net> wrote: > > hi keith... > > > > i recognize you can't do multiple masters to a single slave with mysql's > > replication. > > > > but you can setup separate mysql slave dbs that are independent, and that > yo > > can then iteratively walk through each slave/master, one at a time, and > then > > do the sync/update for each one... this essentially gets you the > > slave/master replication for each server, replicated to the slave db on > the > > system. the result is a bunch of different slave dbs, instead of a single > > db... > > > > however, that didn't get me my answer to my question... > > > > so, how can you do a "replicate-do-db" from within the mysql cmd??? > > > > in fact, even if i only had a single master, but multiple dbs, i'd still > > like to know this, given that i might not want to use the my.cnf file... > > > > thanks > > > > > > -----Original Message----- > > From: B. Keith Murphy [mailto:bmurphy@paragon-cs.com] > > Sent: Tuesday, November 27, 2007 6:31 AM > > To: bruce; 'mysql list' > > Subject: Re: mysql replication.... > > > > > > bruce wrote: > > > hi... > > > > > > a quick question that i haven't found an answer to. > > > > > > i can use "replicate-do-db=foo" in a my.cnf file for replication, to > > > replicate the master foo db on the slave. but this requires that i > > use/have > > > a my.cnf set on the slave. > > > > > > is there a way to dynamically set this attribute/parameter within mysql > on > > > the fly. i thought it would be possible via "change master to" but > didn't > > > find the cmd when looking through the mysql information. > > > > > > basically, i'm going to have multiple databases, on multiple systems, > that > > > i'm going to be replicating to a single system. so, for each master > > server, > > > i'd like to be able to set the databases that i'm going to replicate... > > > > > > thanks > > > > > > > > > > > Can't do that currently in MySQL. It is called multi-master > > replication. You can do multi-slave replication which replicates from > > one master to multiple slaves, but not the other way around. > > > > Keith > > > > > > -- > > MySQL General Mailing List > > For list archives: http://lists.mysql.com/mysql > > To unsubscribe: http://lists.mysql.com/mysql?unsub=baron@xaprb.com > > > > > > |