Re: backup/synchronize tables/db web->local server

2005-02-09 Thread Karam Chand
Well I know about it and I am working on MySQL
Replication, the point is that you dont have control
over replicatation when your MySQL server is installed
by your ISP on shared server,

In that case it is simply not possible :)

Moreover, the simple setup I have, I prefer this then
the nittygritties of replication. Agreed, if you have
a heavy duty setup then the only answer is MySQL
replication.

Karam

--- love <[EMAIL PROTECTED]> wrote:

> It is very easier with mysql replication concipt,
> this automatic 
> replication from Master server to Slave server and
> real time. I wonder 
> how you do not know about this.
> 
> http://dev.mysql.com/doc/mysql/en/replication.html
> 
> Love kumar ..
> 
> [EMAIL PROTECTED] wrote:
> 
> > SQLyog Enterprise's Database Sync Tool is the
> answer
> > for your queries.
> >
> > www.webyog.com
> >
> > Rgds,
> > Karam
> > --- Paul Godard <[EMAIL PROTECTED]> wrote:
> >
> > > Hi
> > >
> > > I use mysql/php on several client web sites
> (each
> > > client has its own
> > > db).  For development purpose, I have a local
> web
> > > server with
> > > php/mysql.  When a web site is still in
> development,
> > > this is the
> > > master db, even if a copy has been uploaded on
> the
> > > live web server at
> > > my isp.  When a site is completed, the web db
> > > becomes the master (as
> > > clients and visitors are updating data on the
> web
> > > db).
> > >
> > > My problem is that I would like to keep the
> local db
> > > synchronized
> > > with the web db (at least for the tables that
> are
> > > regularly updated
> > > on the web).  Manually I would do a dump (data
> > > export only) of these
> > > web tables onto a local file, then empty the
> local
> > > equivalent tables
> > > and then running the sql statements of the dump
> file
> > > (insert).
> > >
> > > I don't do a systematic download of the whole
> web db
> > > as it is
> > > sometimes too big and besides not all the tables
> are
> > > updated by the
> > > client/visitors.
> > >
> > > My idea is to dynamically build a mysql script
> via
> > > php that can do
> > > the job for each client web sites for each of
> the
> > > tables contained in
> > > an array and be executed from a simple click on
> a
> > > button on the local
> > > server of course.
> > >
> > > As I am not a mysql/php guru, I would appreciate
> > > suggestions to do
> > > this as simple as possible.
> > >
> > > Please copy the reply to my email address. 
> Thanks
> > > in advance.
> > > --
> > >
> > > Kind regards, Paul.
> > >
> > > Gondwana
> > > [EMAIL PROTECTED]
> > > http://www.gondwanastudio.com
> > >
> > > --
> > > MySQL General Mailing List
> > > For list archives: http://lists.mysql.com/mysql
> > > To unsubscribe:  
> > >
> >
>
http://lists.mysql.com/[EMAIL PROTECTED]
> > >
> > >
> >
> >
> >
> >
> > __
> > Do you Yahoo!?
> > Meet the all-new My Yahoo! - Try it today!
> > http://my.yahoo.com
> >  
> >
> >
> > -- 
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:
> >
>
http://lists.mysql.com/[EMAIL PROTECTED]
> >
> >
> > The information transmitted is intended only for
> the person or entity 
> > to whom it is addressed and may contain
> confidential and / or 
> > privileged Material. Any review, re-transmission,
> dissemination or 
> > other use of or taking of any action in reliance
> upon, this 
> > information by persons or entities other than the
> intended recipient 
> > is prohibited. If you received this in error,
> please contact the 
> > sender and delete the material from your computer.
> Thank you for your 
> > understanding & co-operation.
> >
> >
> 
> 




__ 
Do you Yahoo!? 
All your favorites on one personal page – Try My Yahoo!
http://my.yahoo.com 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: backup/synchronize tables/db web->local server

2005-02-09 Thread love
It is very easier with mysql replication concipt, this automatic 
replication from Master server to Slave server and real time. I wonder 
how you do not know about this.

http://dev.mysql.com/doc/mysql/en/replication.html
Love kumar ..
[EMAIL PROTECTED] wrote:
SQLyog Enterprise's Database Sync Tool is the answer
for your queries.
www.webyog.com
Rgds,
Karam
--- Paul Godard <[EMAIL PROTECTED]> wrote:
> Hi
>
> I use mysql/php on several client web sites (each
> client has its own
> db).  For development purpose, I have a local web
> server with
> php/mysql.  When a web site is still in development,
> this is the
> master db, even if a copy has been uploaded on the
> live web server at
> my isp.  When a site is completed, the web db
> becomes the master (as
> clients and visitors are updating data on the web
> db).
>
> My problem is that I would like to keep the local db
> synchronized
> with the web db (at least for the tables that are
> regularly updated
> on the web).  Manually I would do a dump (data
> export only) of these
> web tables onto a local file, then empty the local
> equivalent tables
> and then running the sql statements of the dump file
> (insert).
>
> I don't do a systematic download of the whole web db
> as it is
> sometimes too big and besides not all the tables are
> updated by the
> client/visitors.
>
> My idea is to dynamically build a mysql script via
> php that can do
> the job for each client web sites for each of the
> tables contained in
> an array and be executed from a simple click on a
> button on the local
> server of course.
>
> As I am not a mysql/php guru, I would appreciate
> suggestions to do
> this as simple as possible.
>
> Please copy the reply to my email address.  Thanks
> in advance.
> --
>
> Kind regards, Paul.
>
> Gondwana
> [EMAIL PROTECTED]
> http://www.gondwanastudio.com
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:  
>
http://lists.mysql.com/[EMAIL PROTECTED]
>
>


   
__
Do you Yahoo!?
Meet the all-new My Yahoo! - Try it today!
http://my.yahoo.com
 

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]

The information transmitted is intended only for the person or entity 
to whom it is addressed and may contain confidential and / or 
privileged Material. Any review, re-transmission, dissemination or 
other use of or taking of any action in reliance upon, this 
information by persons or entities other than the intended recipient 
is prohibited. If you received this in error, please contact the 
sender and delete the material from your computer. Thank you for your 
understanding & co-operation.





Re: backup/synchronize tables/db web->local server

2005-02-09 Thread Karam Chand
SQLyog Enterprise's Database Sync Tool is the answer
for your queries.

www.webyog.com

Rgds,
Karam
--- Paul Godard <[EMAIL PROTECTED]> wrote:

> Hi
> 
> I use mysql/php on several client web sites (each
> client has its own 
> db).  For development purpose, I have a local web
> server with 
> php/mysql.  When a web site is still in development,
> this is the 
> master db, even if a copy has been uploaded on the
> live web server at 
> my isp.  When a site is completed, the web db
> becomes the master (as 
> clients and visitors are updating data on the web
> db).
> 
> My problem is that I would like to keep the local db
> synchronized 
> with the web db (at least for the tables that are
> regularly updated 
> on the web).  Manually I would do a dump (data
> export only) of these 
> web tables onto a local file, then empty the local
> equivalent tables 
> and then running the sql statements of the dump file
> (insert).
> 
> I don't do a systematic download of the whole web db
> as it is 
> sometimes too big and besides not all the tables are
> updated by the 
> client/visitors.
> 
> My idea is to dynamically build a mysql script via
> php that can do 
> the job for each client web sites for each of the
> tables contained in 
> an array and be executed from a simple click on a
> button on the local 
> server of course.
> 
> As I am not a mysql/php guru, I would appreciate
> suggestions to do 
> this as simple as possible.
> 
> Please copy the reply to my email address.  Thanks
> in advance.
> -- 
> 
> Kind regards, Paul.
> 
> Gondwana
> [EMAIL PROTECTED]
> http://www.gondwanastudio.com
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:   
>
http://lists.mysql.com/[EMAIL PROTECTED]
> 
> 




__ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: backup/synchronize tables/db web->local server

2005-02-09 Thread Coz Web
The mySQL command should read :

mysql -u username -p[password] db_name < dumpfile

Note that you can give the password on the command line but it is best
to get into the habit of just providing -p and typing in the password
when prompted.

BTW, when doing the mysqldump for tables that already exist in the
destination database use  --add-drop-table  this will effectively drop
the existing table before importing the new data.

Coz


On Wed, 9 Feb 2005 17:52:52 +0200, Paul Godard <[EMAIL PROTECTED]> wrote:
> >
> >The piped mysqldump can work in either direction as mysql will also
> >accept a host parameter and php can run shell commands. However, I
> >guess your firewall could be an issue if it prevents connections to
> >the mysql port.
> >
> >There was a thread I believe on the PHP list about doing a mysqldump
> >and emailing the dump file and then processing that dump file on the
> >recipients box.
> 
> Thanks again
> 
> I couldn't find the thread but I manage to save the dump file on my
> local server (at the same location as the php script) by running a
> mysqldump on my local server to fetch a table on the web server.
> 
> mysqldump -h server_ip -u username -p password db_name table1 > filename.sql
> 
> However I couldn't manage to create and insert data on the local
> server (the table1 being not there of course).  I mean the part below
> didn't work.
> 
> >  mysql -u localuser -p local password db_name
> 
> I also tried to run mysql directly but with no success.
> 
> mysql -e "source filename.sql" db_name
> 
> or
> 
> mysql db_name < filename.sql
> 
> However the operation worked via phpMyAdmin (read text file) directly.
> 
> My conclusion is the firewall is not a problem but for some reason
> the syntax of the read dump part is not correct...
> 
> Any idea why?
> --
> 
> Kind regards, Paul.
> 
> Gondwana
> [EMAIL PROTECTED]
> http://www.gondwanastudio.com
> 


-- 
CozWeb Solutions Ltd
http://www.cozweb.net

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: backup/synchronize tables/db web->local server

2005-02-09 Thread Coz Web
On Wed, 9 Feb 2005 15:48:12 +0200, Paul Godard <[EMAIL PROTECTED]> wrote:
> >On Wed, 9 Feb 2005 13:10:16 +0200, Paul Godard <[EMAIL PROTECTED]> wrote:
> >>  Hi
> >>
> >  > I use mysql/php on several client web sites (each client has its own
> >>  db).  For development purpose, I have a local web server with
> >>  php/mysql.  When a web site is still in development, this is the
> >>  master db, even if a copy has been uploaded on the live web server at
> >>  my isp.  When a site is completed, the web db becomes the master (as
> >>  clients and visitors are updating data on the web db).
> >>
> >>  My problem is that I would like to keep the local db synchronized
> >>  with the web db (at least for the tables that are regularly updated
> >>  on the web).  Manually I would do a dump (data export only) of these
> >>  web tables onto a local file, then empty the local equivalent tables
> >>  and then running the sql statements of the dump file (insert).
> >>
> >>  I don't do a systematic download of the whole web db as it is
> >>  sometimes too big and besides not all the tables are updated by the
> >>  client/visitors.
> >>
> >>  My idea is to dynamically build a mysql script via php that can do
> >>  the job for each client web sites for each of the tables contained in
> >>  an array and be executed from a simple click on a button on the local
> >>  server of course.
> >>
> >>  As I am not a mysql/php guru, I would appreciate suggestions to do
> >>  this as simple as possible.
> >>
> >
> >Have you thought about using mysqldump piped to the local DB?
> >
> >For example:
> >
> >mysqldump -h server_name_or_ip -u username -ppassword db_name table1
> >[table2 ...] > mysql -u localuser -p db_name
> >
> >This is (I believe) shown in the on-line manual under mysqldump.
> >
> >It fulfills my needs. You could even set this up in cron (scheduled tasks).
> 
> Hi
> 
> Thanks for the suggestion.
> 
> Do I have to execute that command shell on my local server (because
> of firewall my local server is not on line)?
> 
> Is it possible to trigger mysqldump from a php script?  The idea is
> to have a button on the local site to sync the local db to the web db.
> --

The piped mysqldump can work in either direction as mysql will also
accept a host parameter and php can run shell commands. However, I
guess your firewall could be an issue if it prevents connections to
the mysql port.

There was a thread I believe on the PHP list about doing a mysqldump
and emailing the dump file and then processing that dump file on the
recipients box.

Coz

-- 
CozWeb Solutions Ltd
http://www.cozweb.net

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: backup/synchronize tables/db web->local server

2005-02-09 Thread Coz Web
On Wed, 9 Feb 2005 13:10:16 +0200, Paul Godard <[EMAIL PROTECTED]> wrote:
> Hi
> 
> I use mysql/php on several client web sites (each client has its own
> db).  For development purpose, I have a local web server with
> php/mysql.  When a web site is still in development, this is the
> master db, even if a copy has been uploaded on the live web server at
> my isp.  When a site is completed, the web db becomes the master (as
> clients and visitors are updating data on the web db).
> 
> My problem is that I would like to keep the local db synchronized
> with the web db (at least for the tables that are regularly updated
> on the web).  Manually I would do a dump (data export only) of these
> web tables onto a local file, then empty the local equivalent tables
> and then running the sql statements of the dump file (insert).
> 
> I don't do a systematic download of the whole web db as it is
> sometimes too big and besides not all the tables are updated by the
> client/visitors.
> 
> My idea is to dynamically build a mysql script via php that can do
> the job for each client web sites for each of the tables contained in
> an array and be executed from a simple click on a button on the local
> server of course.
> 
> As I am not a mysql/php guru, I would appreciate suggestions to do
> this as simple as possible.
> 

Have you thought about using mysqldump piped to the local DB?

For example:

mysqldump -h server_name_or_ip -u username -ppassword db_name table1
[table2 ...] > mysql -u localuser -p db_name

This is (I believe) shown in the on-line manual under mysqldump.

It fulfills my needs. You could even set this up in cron (scheduled tasks).

HTH

Coz

-- 
CozWeb Solutions Ltd
http://www.cozweb.net

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]