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.


ABOUT THE AUTHOR

Robert “Bob” Reyes is a technologist, an ICT Consultant and Tech Speaker, a certified Google IT Support Specialist, and an Open Source advocate representing the global non-profit Mozilla (makers of Firefox) in the Philippines. Bob is a Technology Columnist for the Manila Bulletin Publishing Corporation and an aviation subject matter expert contributor for Spot.PH.

Follow The Filipino Tech Explainer on Facebook and X/Twitter.

If you liked my articles or any of the contents or if The Filipino Tech Explainer has helped you in any way, you can buy me a coffee and share your thoughts. Help me continue producing awesome articles by supporting my website. Maraming salamat po! Thank you very much!

What’s your Reaction?
+1
0
+1
0
+1
0
+1
0
+1
0
+1
0
+1
0
2 thoughts on “Importing Big MySQL Databases”
  1. 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!

Leave a Reply