I need some idea on how to accomplish a master-slave database in MySQL. It's like, there's a primary server which the system connects then when it is down, it will use its local server. Here's the scenario:
I'm doing my thesis as a requirement for my course, I'm currently developing a web-based POS which will be installed for two branches, the system will be connected to the main office as the server is located there. What my client wants is to have a secondary database which will be used whenever the internet connection is down, that secondary database is installed in the computer in the branch. Well ofcourse, the primary database is in the main office, and it needs at internet connection for the POS and the primary database to work together.
Then when the internet connection works again, the primary database will be updated from the latest records in secondary database.