Splitting big mySQL files into chunks

Some times it is very dificult to move big dbs across servers here is a tip about how to do it.

This is a very handy application when you need to migrate a big database and the remote server keep crashing.

What it does is to split the sql file into smaller chunks to be easer to digest.

https://code.google.com/p/code-discuz-tukyonline/downloads/detail?name=SQLDumpSplitter.zip&can=2&q=

You probably will have some foreign keys issues when you import from mySqlAdmin or similars.

to avoid that change the foreign key checks to 1 in the dump before you import

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=1 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=1 */;

 

Nice coding and good luck…

 

 

About the author
Eduardo Silva was born in Buenos Aires, Argentina, and has being living in London for the past 15 years. With a background in psychology he is a IT developer and the co-founder of open-ecommerce.org, a digital content social enterprise. His passion is digital story-telling and has created short films and documentaries to help people promote there ideas.