Import Large Dump into MySQL.
Had to import a Large File into Mysql today.
Here is how you do it. 🙂
Step 1 : Login
mysql -u root -p database_name
Step 2 : Set network buffer length to a large byte number
set global net_buffer_length=1000000;
Step 3 : Set maximum allowed packet size to a large byte number
set global max_allowed_packet=1000000000;
Step 4: Disable foreign key checking to avoid delays,errors and unwanted behaviour
set foreign_key_checks = 0;
Step 5 : Import Dump
Step 6: Remember to enable foreign key checks when procedure is complete
SET foreign_key_checks = 1;
More Details on Importing Large Dump is here. https://cmanios.wordpress.com/2013/03/19/import-a-large-sql-dump-file-to-a-mysql-database-from-command-line/