As a developer I am tasked with importing very large databases into PHPMyadmin on my local server. As many of you that had to do the same know, it can be tedious with timeout issues or other PHPMyadmin errors.
A better and much faster method is to use Terminal on Mac or Windows console.
Export the database to a folder on your computer, this must be a .sql file for this method to work.
Open Terminal and change directory to the location of your .sql file.
Run the following in Terminal to execute the sql queries.
mysql -u[USERNAME] -p[PASSWORD] [DATABASE_NAME] <[NAME_OF_SQL_FILE]
Replace the brackets and words in caps with your actual details.If you do not need a password, leave blank then when it asks you for password just click Enter.
Depending on your sql file, this could take a few seconds to minutes.
Enjoy! If you find this tutorial useful, please leave a comment or follow us on Twitter @westernstudios