How to dump MySQL database and split into 10 MB files on the fly
A useful trick if your server's configuration is weird

Recently I had to dump a database that was too big to dump with with phpMyAdmin and I couldn't just use mysqldump tool from command line because there was a 10 MB file size limit on the server.
After some trial and error I came up with the following solution for *nix systems:
mysqldump -uLOGIN -pPASSWORD DATABASENAME | split -b 9000000 - dump
Where 9000000 is the maximum output file size in bytes.This command will dump the whole DATABASENAME into a series of files.
Comments