It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming PHP and MySQL Forum

Two (or more) databases

Moderator: Malcolm

Two (or more) databases

Postby nighthawk on Tue Jan 16, 2007 3:46 pm

I need to have two databases with identical structure on two different servers. Is there a way to automaticaly sinchonize them?
The Zeitgeist Movement
User avatar
nighthawk
250+ Club
 
Posts: 420
Joined: Sun Jun 11, 2006 1:53 pm
Location: SFRJ

Postby rse on Thu Jan 25, 2007 3:54 pm

How accurately do you need them synchronised - like daily, or every query?

If you only need it sync'd for backup purposes then you could just write a PHP script to export the DB to a text file then FTP it to the other server.

If you need it sync'd per DB query then the best way I guess would be to write in two queries in your code updating them both at the same time.

If you need help with the cron option, i can probably write you a script to do it.
Adam Williams
PHP Web Developer

Personal: http://30things.net
Blog: http://www.root-servers.co.uk
User avatar
rse
100+ Club
 
Posts: 141
Joined: Sun Oct 10, 2004 8:15 pm
Location: Leeds, UK


Who is online

Users browsing this forum: No registered users and 0 guests