List:General Discussion« Previous MessageNext Message »
From:BD Date:April 4 2002 6:00pm
Subject:RE: Transfert Data from one DB to another
View as plain text  
At 10:43 AM 4/4/2002, you wrote:
>Hi david,
>Just create another table in your database with the structure and data of
>the table. See "CREATE TABLE ... SELECT ..." syntax at :
>http://www.mysql.com/doc/C/R/CREATE_TABLE.html  for this task.
>
>  Then update all the category values from 2 to 4 in that table. Use
>mysqldump to copy it into an sql file and load it in your other database.
>  Does this help?
>
>Gurhan

Gurhan,
         Actually you don't even need to dump the data (if you have a 
connection to both databases). You can try something like:

create table database2.mytable select * from database1.mytable where  .... ;

Then count the records that were transferred and if they compare to the 
original table, delete the rows from the original table.

Brent




>-----Original Message-----
>From: David BORDAS [mailto:bordas@stripped]
>Sent: Thursday, April 04, 2002 11:15 AM
>To: mysql@stripped
>Subject: Re: Transfert Data from one DB to another
>
>
>Yes but in fact i forgot to say that i have to change a value of a column,
>Ex dump all data from table where category = 2 and
>insert all this data into the other mysql with category = 4 and not 2
>
>I think with too connection
>i can select all data then insert in new server
>ben delete on the old server
>with a C script but'll not be very efficient ... and not easy to make it
>working
>
><<
>Look at mysqldump utility:
>      http://www.mysql.com/doc/m/y/mysqldump.html
>
>Look at replication:
>      http://www.mysql.com/doc/R/e/Replication.html
> >>
>i know mysqldump but in this case, i think this can't help me.
>
>Replication ? i don't know, i'll have a look
>
>
>Thanks
>David
>
>
>---------------------------------------------------------------------
>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 <mysql-thread105108@stripped>
>To unsubscribe, e-mail
><mysql-unsubscribe-c-gurhan.ozen=wcom.com@stripped>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
>---------------------------------------------------------------------
>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 <mysql-thread105120@stripped>
>To unsubscribe, e-mail <mysql-unsubscribe-bdgridly=yahoo.com@stripped>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

Thread
Transfert Data from one DB to anotherDavid BORDAS4 Apr
  • Re: Transfert Data from one DB to anotherEgor Egorov4 Apr
  • RE: Transfert Data from one DB to anotherGurhan Ozen4 Apr
    • Re: Transfert Data from one DB to anotherDavid BORDAS4 Apr
      • RE: Transfert Data from one DB to anotherGurhan Ozen4 Apr
        • RE: Transfert Data from one DB to anotherBD4 Apr