Hi All, Im looking for a solution for the following problem OK here is the situation. I have 2 databases on the same server under seperate domains. The databases are identical and hold exactly the same information. What im looking at doing is setting up a cron so on a daily basis Database1, is copied over to Database2. Or even better if this can be done in realtime without using a cron. The sites are currently on a Cpanel Server and have been developed using PHP and Mysql. Whats the best solution going forward? Regards Tom
did you try http://www.phpmyadmin.net/ ? Or even better mysqldump PS if both databases on the same host you can have just one and easily access it from both sites.
Hi Mate, Thanks for your reply. Yes the server has PHPMyAdmin installed. Both sites are on the same server. I have considering doing a daily or weekly database dump, but ideally i would like to automate the process and let this all happen automatically. Whats the best way forward with this? Regards Tom
SQLYog It's an application which you can install on your pc and perform all kind of such tasks, you may also compare and match with your a database on a remote server (Maybe your own pc - running with xampp)
Thanks for the reply. Im currently using this, but ideally i would like to do this remotely and have it automated etc. Tom
are the mysql databases on the same cpanel account? if they are then in your php coding where it does the mysql querys to put info into the database do the same query twice one for database 1 and another for database 2 then anyinformation that is input will be put in database 1 & 2 -John
Hi John, They are on 2 seperate hosting accounts by on the same server. i.e. Domain 1 - Domain 2 Ive tried adding Domain 1's database info in domain 2 connection scripts but for some reason this isnt working. Regards Tom
No there are 2 totally seperate websites, and need to be kept independant. Thanks for everyones help here, its much appreciated
this looks like it can only be done manually .. I am willing to do it manually daily for $10 a week -John
really do NOT understand....two websites(two domains)...can share one database.......why you need two identical database? I never saw this kind requirements. If you need backup your database.....you can do it every week/every day......or even every hour......... Now..I believe your two db are on the same hard disk........if the hardware has problem..both of them have problem.
If it is your own server, why not use OUT FILE and LOAD FILE of Mysql? It will be fast and accurate. More over 2 queries will make life simpler for cron writer too. If you know how to write a cron, I can help with mysql queries to get the job done