简体   繁体   中英

Restoring MySQL from localhost to live server using PHP

I am developing a web application in CodeIgniter and MySQL.

I need to set up a function to update data in MySQL in my local server when there is no internet connection and later switch to live server when the connections are available, restore the locally saved data into live database as well.

(There may be clients 1) at remote location who have poor internet connectivity which I need this idea for and 2) the other who can add data directly to the live server).

Is there any mechanism to get this done?

Mysql Database Replication

Replication enables data from one MySQL database server (the master) to be replicated to one or more MySQL database servers (the slaves). Replication is asynchronous - slaves need not be connected permanently to receive updates from the master. This means that updates can occur over long-distance connections and even over temporary or intermittent connections such as a dial-up service. Depending on the configuration, you can replicate all databases, selected databases, or even selected tables within a database.

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