Dear Glyn,

you can dump a database under Unix and Windoze in the same way (shell under Unix, 
command line under Windoze. You should go to c:\mysql\bin\ first if Windoze can't find 
the path. I assume there are no privilege restrictions on either machine, otherwise 
you will have to enter -u username -p, additionally):

    mysqldump my_database > my_dump.sql --add-drop-table

(This will place my_dump.sql in the current directory. With --add-drop-table you add a 
drop table statement: When importing in the next step, your tables on the target 
machine will be deleted first, then created again and filled with data. This will 
eliminate duplicates.)

You can import the dump on all operating systems as follows:

    mysql < my_dump.sql

If you want all this for a single table, this is the way:

    mysqldump my_database my_table > my_dump.sql --add-drop-table
    mysql < my_dump.sql my_database

BTW, you might want to use PhpMyAdmin for all this. It does the same, but with a 
graphical interface.

--
  Stefan Hinz
  Geschäftsführer / CEO iConnect e-commerce solutions GmbH
  #  www.js-webShop.com www.iConnect.de
  #  Gustav-Meyer-Allee 25, 13355 Berlin
  #  Tel: +49-30-46307-382  Fax: +49-30-46307-388

  ----- Original Message ----- 
  From: Glyn Davies 
  To: [EMAIL PROTECTED] 
  Sent: Friday, July 27, 2001 8:00 AM
  Subject: Moving database from windoze to Linux


  Good day,

  I have created a database using MySQL under Windoze and am trying to move the data 
to MySQL running on Linux. I have exported the data to a res file - can't see how to 
do a mysqldump in Windoze. I then try and import the file on the Linux machine using 
LOAD DATA, but end up with either NULL in all the fields except the primary key field 
or if I use ENCLOSED BY '', I end up with the data enclosed by quotes.

  How do I do this "properly", please?

  TIA

  Glyn
  <><><><><><><><>
  Glyn Davies
  Cirrus-TechVue
  South Africa
  Tel: +27 11 783 1508
  www.cirrus.co.za 


  ______________________________________________
  "The information contained in this email is intended solely for the
  use of the individual or entity to whom it is addressed and others 
  authorised to receive it.

  Cirrus Techvue is not liable for the proper, complete transmission 
  of the information contained in this email, or any delay in its 
  receipt, and does not warrant that the mail is virus-free."




------------------------------------------------------------------------------


  ---------------------------------------------------------------------
  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

Reply via email to