17
Nov

Had you ever experienced exporting and importing a MySQL database? There should be no problem doing these simple tasks, thanks to PHPMyAdmin. But, if your database is big, say the one being used by a forums website with around 50 active users, it may be hard to import the MySQL database since it will take some time and you might encounter “timeouts” along the way (specially if your internet connection is not that fast enough to beat the timeout settings of the MySQL server).

The best way to import a MySQL database, if it is big (more than 10MB, is thru the command lines — SSH access is required. Simply execute the following command:

mysql --username=myusername --password=mypassword newmysqldb < oldmysqldb.sql

Where,  myusername is the MySQL Database User; mypassword is the MySQL Database User Password; newmysqldb is the name of the empty MySQL database; and the oldmysqldb.sql is the SQL file containing the exported database.

Now, sad to say, due to security concerns, most webhosting service providers doesn’t give SSH access to their clients. You may want to ask your webhosting service provider to do this on your behalf.

If your current webhosting service provider tells you that they cannot do it (either they do not know how to do it — the command is already above!; or they do not have SSH access), better think of transferring to another webhost (TurfSitePH.net is always here, hehehe), as they may just be a reseller of another company.

Popularity: 9% [?]

This entry was posted on Saturday, November 17th, 2007 at 5:25 pm and is filed under MySQL, Technology. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or TrackBack URI from your own site.


2 Responses so far to "Importing Big MySQL Databases"

  1. 1 Databases
    January 1st, 2008 at 7:11 am  

    I FEEL SO LUCKY TO HAVE FOUND THIS BLOG!!! Your recent post () really impressed me. Had found this blog a long time ago, I would have really appreciated it. I was searching MSN for information on Databases when I stumbled across you Monday. Keep it going!

  2. 2 Dexter | Tech At Hand Dot Net
    July 29th, 2008 at 10:55 pm  

    Thanks for sharing.. One simple Question how to use SSH.. Maybe you want to post instructiion on What program I can use for this application..

    Thanks for dropping at my site

Leave a reply

Name (*)
Mail (*)
URI
Comment
Your Ad Here