Importing a MySQL DB into WAMP

If you are like me and other Windows users, you most likely use WAMP or XAMPP as a PHP localhost environment stack. And in most cases, you use the MySQL service along with phpMyAdmin. For the most part phpMyAdmin handles all the database management tasks you need as well as a pretty great import and export feature. However, there are times when your DB dump is far too large for phpMyAdmin to handle, and twiddling with php.ini settings doesn't help fix it -- but there is a solution!

The MySQL services comes installed with a MySQL console which you can use to import the SQL file. After you turn WAMP on, click on the system tray icon, navigate to the MySQL folder and open the MySQL console. This should open a command prompt that asks for your password (usually empty if you use the default install settings). To import simply run the following commands (you can type \h to view more all the commands).

use databaseName;
\. C:\path\to\sql\dump.sql

And that's it! Be sure to have a raw SQL dump as the import won't work on gzipped files.