Re: Updating data on remote server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Do you have root access to the internet MySQL server? The easiest way to do
this would be to use replication, I think. It doesn't sound too difficult to
set up and it would do all of the updating for you. Is that an option? If
not, then you can enable binary logging (I think that's what it is) in your
local MySQL server and maybe use that log to update the two servers (this is
what replication does for you, though). Last option, beside what you're
doing, is doing a dump of the data and importing it on the Internet server
(or, again if you have access, just copy the mysql/data/database_name folder
from one to the other, but you have to shut down MySQL temporarily to do
that).

---John Holmes...

----- Original Message -----
From: "Dmitry Murashev" <dsmurashev@mail.ru>
To: "DB-PHP" <php-db@lists.php.net>
Sent: Monday, December 16, 2002 4:04 PM
Subject:  Updating data on remote server


Hello everybody!

I've got a very intersting task for myself and I hope somebody can help me
to solve it.

I have a big site in the Internet that stores many information in several
tables. The site is PHP and MySQL based. I have a copy of this site on my
local server. Any data for the site I add and update on the local server and
only then I upload it on my site in the Internet. The task is what is the
best way to update my data on remote site? What programms in PHP should I
write?

Now I'm trying to use two ways (They can seem too boring)

1. I write all MySQL commands that executes on the local server into
separate table. These commands are DELETE, UPDATE and ADD. Every record has
(in field 'date') a time when it was executed. So from time to time I copy
all commands to a text file, then copy file to the remote server and execute
them there.
2. Every table has the field 'date'. When any infromation is UPDATEd or
ADDed (not DELETEd) the time is writes into necessary row. So the time in
field 'date' shows when the information was updated or added. Again from
time to time I just copy commands (according to the time I select) to a text
file, then copy file to the remote server and execute them there. In this
case I don't know how the remote site will know what data was deleted on the
local site.

The problem is that these two methods are not proffesional written and have
many lacks and the text files becomes too big for uploading (0.5 - 1 Mb).

Could anybody give me any suggestions or links to related resources please?
What methods to update data on the remote server from the local one are?


Thanks,
Dmitry Murashev



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux