Take the 2-minute tour ×
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. It's 100% free, no registration required.

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 stackoverflow.com 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

1 Answer 1

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

 
discard

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.