synchronous the database

A

Anonymous

Guest
hallo all,

i have a problem about synchronous data on database. let say i have 2 server, and i want to synchronous each other. how i can do that using php? thanks before.
 
in bin directory of MySQL you have a little programm like mysqldump use it for create copy of database..... and after that just run script in host what you want......
 
but i dont want to do manually, automatically when user click syncronize db on my website
 
As is usual, the best thing to do is let MySQL do all the work for you, and as is usual, this is all covered in the documentation. Check out the chapter on Replication.

There's a good tutorial on PHPBuilder.com to get you started.

This whole affair begs the question, though, why do you have two different MySQL servers/databases for the same set of data?
 
Hm. Well, this complicates things significantly. I'm not an ADOdb expert, so I can't think of an easy way to do this. The only way I can think of is whenever you do an operation, simultaneously do it to each of your databases. Of course, this multiplies the processing time by the number of databases you're updating, but maybe someone else can think of a better way. Again, I'm curious as to why you have the same set of data in two different databases.
 
Back
Top