On 24/06/2010 09:18, Tompkins Neil wrote:
HI,
We have set-up MySQL Community Server 5.1.46 with Master to Slave
replication and everything appears to be working correctly, however I have a
couple of questions which I hope somebody can shed some light.
(1) When the network connection goes down between the master and slave
servers, it would appear that the updates are only sent from the master to
the slave, but not from the slave to the master when the connect is
re-established. Is this correct ?
Yes. Replication is one-way by default. If you want two-way replication
you have to set it up explicitly with both servers simultaneously acting
as both master and slave.
(2) What is the situation regarding conflicts if the same master and slave
record is edited at the same time ?
You shouldn't normally edit records on the slave while it's acting as a
slave. Replication has two main functions: to provide a "hot backup" of
the master so that you can switch to the slave as the new master
instantly should the master fail, and to allow load balancing by
performing all reads on the slave (or multiple slaves) and updating only
the master (eg, where you have a web cluster with each web server having
its own MySQL instance acting as a slave from a central master updated
from your CMS).
Two-way replication is possible, but there are rarely any significant
benefits from it. If you do use two-way replication, you have to
implement locking at the application level as MySQL doesn't provide it
natively.
See the replication FAQ for more information:
http://dev.mysql.com/doc/refman/5.1/en/replication-faq.html
Mark
--
http://mark.goodge.co.uk
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org