RE: Copying Tables across machines

2002-10-14 Thread Paul DuBois

At 15:16 -0400 10/14/02, Dennis wrote:
>At 02:51 PM 10/14/2002, you wrote:
>>  > Is there a way to copy a table from one mySQL machine to another without
>>>  implementing replication? The goal is be able to grab a copy of a table
>>>  from some other machine (without regard to master/slave relationships) in
>>>  some programmatic way without having to do a dump, copy file and rebuild.
>>
>>Check out mysqldump.
>>
>>sql, query
>
>I said I didnt want to do a dump and a copy.
>
>I guess I wasnt clear. Is there anything in mySQL that will do this? 
>There is a "Load Data from MAster", so there could easily be a "load 
>data from server" also.
>
>Dennis

What makes you think this would be easy?  I mean, aside from the "it's
always easy when you're not the one who has to implement it" prinicple. :-)

You seem to want what is essentially a replication-like operation, without
setting up replication.

Or a mysqldump-like operation, without using mysqldump.

If your table is a MyISAM table, you can directly copy the table files
with scp or something, but then you have to think about having the server
flush the tables first, to make sure that you're not copying tables that
have some active operation going on them.  Ick.

Maybe mysqlhotcopy would suit your needs. You can run it on the "master"
machine and tell it to use scp to copy the table files to the "slave"
machine.  It'll take care of the flushing and locking for you, to make
sure your copied files aren't inconsistent.

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Copying Tables across machines

2002-10-14 Thread Dennis

At 02:51 PM 10/14/2002, you wrote:
> > Is there a way to copy a table from one mySQL machine to another without
> > implementing replication? The goal is be able to grab a copy of a table
> > from some other machine (without regard to master/slave relationships) in
> > some programmatic way without having to do a dump, copy file and rebuild.
>
>Check out mysqldump.
>
>sql, query

I said I didnt want to do a dump and a copy.

I guess I wasnt clear. Is there anything in mySQL that will do this? There 
is a "Load Data from MAster", so there could easily be a "load data from 
server" also.

Dennis


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Copying Tables across machines

2002-10-14 Thread Iikka Meriläinen

On Mon, 14 Oct 2002, Dennis wrote:

> Is there a way to copy a table from one mySQL machine to another without
> implementing replication? The goal is be able to grab a copy of a table
> from some other machine (without regard to master/slave relationships) in
> some programmatic way without having to do a dump, copy file and rebuild.
>
> Something like:
>
> Copy Server:dbase:table to localhost:dbase:table

Hi,

I've never tried this in real life, but I can't see why
xcopy data\db\*.* (frm/MYD/MYI for MyISAM tables) server2\data\db
The file copying across the network could be done via FTP, SMB or anything
that is good for your platform.

Not sure on this either, but do platforms/OSes with 32/64-bit stuff cause
problems? How about the byte order? Anyone wiser than me, please comment on
this! :-)

Have you tried building a script that automates the mysqldump process?

Regards,
Iikka

**
* Iikka Meriläinen   *
* E-mail: [EMAIL PROTECTED] *
* Vaala, Finland *
**


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php