Okay so here's my scenario. I have two applications that share some tables from the same DB. Let's call them App1 and App2. Lets also assume the DB used here is called DB1. App1 and App2.
App1 is on the same machine as DB1. App2 is on a different server but connects to DB1 remotely via PHP. This setup sometimes slows down access to DB1 from App2 and causes timeouts.
I will be creating DB2 which will be a replica of DB1 and hosted on the same machine as App2. This DB2 should be automatically synched with DB1. Changes are only going to made on DB1, so just need to push changes to DB2 regulary.
How can I do this? I'm assuming the solution to do this will be using cron jobs and PHP but I do not know what code can help do this.
Thanks all!
Edit: Please don't post links to MySQL theory or documentation. I am hoping someone has already done something like this and can share what they did.