Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have serverA and ServerB. I need ServerA to copy a database to ServerB and UPDATE/INSERT/DELETE as it changes. I think this can be done with replication but I don't want to continually open a connection. Is it possible to use CREATE EVENT or TRIGGERS? If so, where do I start?

share|improve this question

migrated from Dec 15 '12 at 15:27

This question came from our site for professional and enthusiast programmers.

It's triggers that require an open connection, not replication. – Panagiotis Kanavos Dec 14 '12 at 13:01
yes i meant CREATE EVENT. Is it possible to have CREATE EVENT to update a database in another server? – Dev-Ria Dec 14 '12 at 13:07

Replication DOES NOT require an open connection. There's even an entry in the FAQ for this.

B.13.1: Must the slave be connected to the master all the time?

No, it does not. The slave can go down or stay disconnected for hours or even days, and then reconnect and catch up on updates.

If anything, replication is the most efficient solution when you only want to send changes from a master server to a replica periodically

share|improve this answer
oh I must have misread. I have seen documentation about replication on the same server but how can I set replication to another server cause I understand it will require username and pass to connect. – Dev-Ria Dec 14 '12 at 13:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.