How do I move databases between hosts?

Discussion in 'MySQL' started by dfsweb, Feb 26, 2006.

  1. #1
    Hi all,
    I have been hosting my sites in New Zealand for the last few months and I realised that if I am ever going to make any money from my websites, I will have to move to cheaper hosting firms. At the moment, I am paying around USD30 a month for each site for a measly 100MB hosting plan (ouch).

    Anyway, I have decided to move my hosting to GoDaddy. They seem to be fairly reliable based on what I have heard, plus they are really cheap in comparison (around 1/10th for the cheapest plan). Plus, I will be getting around 50 times the hosting space too! :D

    Anyway, getting to the point now ..... what's the best way for me to move my MySQL databases from my current host to GoDaddy? Is there a simple and reliable way or do I have to export (to csv) from my current host and then import the data to the new host? I will, of course keep my existing hosting plan until I am completely satisfied with how things are working on the new site and then I will change the A record and then finally, cancel my existing hosting plan.

    Any suggestions?
    dfsweb
     
    dfsweb, Feb 26, 2006 IP
  2. pachecus

    pachecus Well-Known Member

    Messages:
    1,841
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    110
    #2
    If you have phpmyadmin in your control panel, you can "export" your databases and get them in a compressed file, then from your godaddy control panel you can import these files.
     
    pachecus, Feb 26, 2006 IP
  3. dfsweb

    dfsweb Active Member

    Messages:
    1,587
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    88
    #3
    Wow, that was a quick response! :D And yes, I have phpmyadmin with my existing host. I will get hosting with GoDaddy and will try it this weekend and I'm sure it will work. Cheap hosting, here I come!!
    Thanks a lot!
    dfsweb
     
    dfsweb, Feb 26, 2006 IP
  4. vectorgraphx

    vectorgraphx Guest

    Messages:
    545
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #4
    in my experience, moving mysql databases from one host to another, when i exported my database to a zip file, keep it in the zip file. then, when you go to import, import the zip file. i tried extracting the sql file out of the zip and importing it that way - and it didn't work. only when i imported the zip file was i able to import the database - and it did it flawlessly.

    VG
     
    vectorgraphx, Feb 28, 2006 IP
  5. DarrenC

    DarrenC Peon

    Messages:
    3,386
    Likes Received:
    154
    Best Answers:
    0
    Trophy Points:
    0
    #5
    The problem you will have is that most hosts only allow certain size .sql files, so its best to put it into a zip file as vector mentioned. Most hosts will then load the files for you straight into your created mysql database.

    I moved 2 monster databases recently without any problems.

    Darren
     
    DarrenC, Feb 28, 2006 IP
  6. dfsweb

    dfsweb Active Member

    Messages:
    1,587
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    88
    #6
    Hi guys,
    I decided to stick with my existing host for my existing site and for the new GoDaddy Hosting account, I decided to use that for my new site www.latinos.co.nz. So, I won't have to move sites anyway! :) But, that's not to say that I won't be doing this in the future so thanks a lot for your help.
    dfsweb
     
    dfsweb, Feb 28, 2006 IP
  7. bentong

    bentong Banned

    Messages:
    3,543
    Likes Received:
    257
    Best Answers:
    0
    Trophy Points:
    0
    #7
    on your phpmyadmin:

    export to backup your database and when restoring your db, click on the 'SQL Tab'..
     
    bentong, Mar 5, 2006 IP
    dfsweb likes this.
  8. dfsweb

    dfsweb Active Member

    Messages:
    1,587
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    88
    #8
    I finally did end up using this. I didn't realise just how easy it was. Did this exactly as described by bentong. Cheers!
    dfsweb
     
    dfsweb, Mar 5, 2006 IP