SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    VICTORY IS MINE! luchazard's Avatar
    Join Date
    May 2001
    Location
    USA
    Posts
    229
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Moving a mySQL database??

    Ok here is the deal. I have a site and most of the content is called in with PHP scripts and I have everything stored in mySQL. I'm going to switch to a different host soon... does this mean I will have to write my database all over again from scratch?? Or can I transfer it some how?

    Thanks!

  2. #2
    SitePoint Wizard
    Join Date
    Apr 2000
    Posts
    1,483
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you have telnet access to both hosts, log into telnet and type this on the old host:

    Code:
    mysqldump -uyourusername -p yourdatabase > /path/to/file.sql
    Then download the file.sql and upload it to your new host, and type this:

    Code:
    mysql -uyourusername -p yourdatabase < /path/to/file.sql
    I'm not 100% sure of the syntax of the second one but it should be OK.

  3. #3
    SitePoint Enthusiast DCE's Avatar
    Join Date
    Feb 2001
    Location
    UK
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No need to log into both hosts..
    just FTP into your new host from the Telnet window of the old one, then just send the file that way
    very quick, using their connection
    DCE
    If everything seems to be going well, you have obviously overlooked
    something.

  4. #4
    VICTORY IS MINE! luchazard's Avatar
    Join Date
    May 2001
    Location
    USA
    Posts
    229
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    YES! I'm glad it will be an easy move!

    Thanks for your help.


Bookmarks

Posting Permissions

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