Monday, August 31, 2009

Importing large mysql database dump into Godaddy shared hosting

So, you have a database dump which you want to upload to Godaddy? There is the Import tab in phpmyadmin, but it often times out for big files, so it's not really good. Luckily, there is a better way using FTP:

Upload your dump with FTP into the _db_backups directory in the root of your hosting account. Then go to hosting management, databases and click on the pencil icon beside the database into which you want to pump data.

Then check out the icons on the top. Select Restore and you'll see your dump file there (possibly you have to give it a .sql extension, I used this extension in the first place).

Next select the file and start the restore. A warning will pop up saying the existing database contents will be lost, but don't worry, it happens only if you restore a complete databse dump with dropping tables and stuff. If your dump contains only insert statements and such then existing data won't be harmed. You can always create a database backup first in database managament if you want to be on the safe side.

The uploading of the dump may take a while, but that's it. I don't know why Godaddy doesn't have this description in their support pages. It's very useful.

14 comments:

  1. Great! This is really a life saving help.

    Thank you very much!

    ReplyDelete
  2. Hi, I don't see "Pencil" icon or "Restore" link anywhere.

    ReplyDelete
  3. Hi, I have figured it out. Thanks very much.

    ReplyDelete
  4. Thank you!!! Saved me lots of time!!!!!!!!

    ReplyDelete
  5. Thank You very much.This was very useful after several frustrating hours...

    ReplyDelete
  6. Thanks! Really save me some time!!! And yes, it should be in GoDaddy's docs!

    ReplyDelete
  7. Thanks! Nice Trick.

    ReplyDelete
  8. Thank you for this post! Without this option it is very difficult to move your hosting to GoDaddy, I'm surprised they don't offer better "new customer" support.

    ReplyDelete
  9. Thank You so much. Nice Trick.

    ReplyDelete
  10. Thanks ..You Rock

    ReplyDelete