Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2004
    Posts
    1

    Question Unanswered: move db from unix to windows

    I have two cheap servers at home, one Windows based and one UNIX based, both of them running MySQL server. The UNIX machine is running MySQL Server v4.0.18nb2 and the Windows machine is running MySQL Server v4.1.7.

    The thing is that the really old UNIX machine is getting to slow for my needs and the more powerful Windows machine has lots of CPU power to spare. Therefore I would like to move the database contained on the UNIX machine to the Windows machine instead. I don't care about the db data on the Windows machine, I want it to be erased at the same time. I just need the db data on the UNIX machine to run on the Windows machine instead.

    What are the nessesary steps? Should I just move the files in the data directory to the Windows machine and point out the new data? If so, what else should I do? Are there any documents describing the steps? (Notice the 4.0 -> 4.1 version change of the db engine.)

    Thanks in advance...
    //Marcel R, Stockholm, Sweden

  2. #2
    Join Date
    Mar 2004
    Posts
    480
    I would just use mysqldump and save the output to a file. drop that file onto your windows machine (doesn't matter where). In the windows machine create the database simply using
    Code:
    CREATE DATABASE databasenameyouwant
    then call the mysqldump file into the database on that machine from your command prompt or even using RUN.

    Code:
    /pathtomysql/mysql -uUSERNAME -pPASSWORD databasenameyouwant < '/pathtomysqldumpfile/dumpfile.txt'
    and that will recreate the database for you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •