简体   繁体   中英

Synchronise database between 2 hosts

I build a mirror host for my web site. I use Lsyncd for the synchronisation of project files and it works perfectly.

For the database, what is the best way to make a synchronisation between the master and the mirror server?

The best solution is to set up database replication in MySQL. MySQL replication allows you to have an exact copy of a database from a master server on another server (slave), and all updates to the database on the master server are immediately replicated to the database on the slave server so that both databases are in sync.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM