Manual MySQL DB Importing

MySQLPHP MyAdmin is a great tool for easy administration and quick backup creation, but some things are best left for the command line. Today I had to work from home and although I had a backup of my work DB on my flash drive, I knew PHPMyAdmin wouldn't allow an import of its size (4.51mb total.) I was eager to try some other tools to get around this, since ultimately I would be doing the same thing on our production server. Bigdump came up in my research, but I hadn't read ahead to uncheck "extended inserts" in my original backup. When the insert statement exceeds 300 lines, Bigdump reports and error.

Leave it to the command line to save my bacon. I put to dump file at the root of the MySQL install, logged in and executed the file with the source command:

mysql -u <username> -p <password>
> use <database_name>
> source dumpfile.sql

Command line to the rescue! If your host does not allow you access to the root install of MySQL, an absolute path from your home directory will suffice.