My 5th book "50 Tips on JavaScript" is on sale. Go get it from
Illustrated guide to 50 of the most interesting JavaScript topics.

Importing huge MySQL dump under Windows.

I just received a 250MB dump of a database and I needed to see what is it inside. As you may guess, PHPMyAdmin is not a good option in this case. I decided to use the command line.
First of all, you should have mysql command available in your command prompt. I firstly tried this
mysql -u root -h localhost my-sql-table < ./hugedump.sql
and I got
The '<' operator is reserved for future use. ....
I'm using PowerShell and it looks like there is a problem with that. Then I found the following solution:
&cmd /c 'mysql -u root -h localhost my-sql-table < .\\hugedump.sql'
However, this doesn't work either. I still had to use mysql command but not like that. Here is the final workaround:
mysql -h localhost -u root
Type your password after that. Select the empty database where the dump will be inserted:
use my-sql-table;
After that simply type
source ./hugedump.sql;
If you enjoy this post, share it on Twitter, Facebook or LinkedIn. To leave a comment go here.