#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    1
    Rep Power
    0
    When I move my site which uses a MySQL database, how would I move the whole database from the old MySQL server to the new one?
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 1999
    Location
    Badhoevedorp, the Netherlands
    Posts
    3
    Rep Power
    0
    You could use mysqldump to export the current db to textfile format, and import the output from mysqldump on your new server using the following:
    mysqldump -p mydb --add-drop-table > mydb.sql (on your current server)
    then upload the file mydb.sql to your new server (you could use gzip to compress it)
    mysql -p mydb < mydb.sql (on your new server)

Similar Threads

  1. Cannot Use database located on a web server in VB
    By labamba in forum Visual Basic Programming
    Replies: 9
    Last Post: July 5th, 2004, 07:19 PM
  2. Replies: 5
    Last Post: July 2nd, 2003, 08:54 AM
  3. Replies: 2
    Last Post: November 5th, 2001, 03:40 PM
  4. Moving a database to a different server
    By ashalson in forum MySQL Help
    Replies: 5
    Last Post: July 15th, 2001, 12:31 PM
  5. Replies: 3
    Last Post: July 3rd, 2001, 12:24 PM

IMN logo majestic logo threadwatch logo seochat tools logo