Skip to content

Instantly share code, notes, and snippets.

@panique
panique / mysqldumpsplitter.sh
Created June 30, 2013 18:52
This is a copy of the the excellent MySQLDumpSplitter shell script written by KEDAR from http://kedar.nitty-witty.com. As no professional tool was able to split my massive 22GB mysqldump file to multiple files (each one containing the whole statement for one table) and this little script did the job without any errors in short time, i think this…
#!/bin/sh
# http://kedar.nitty-witty.com
#SPLIT DUMP FILE INTO INDIVIDUAL TABLE DUMPS
# Text color variables
txtund=$(tput sgr 0 1) # Underline
txtbld=$(tput bold) # Bold
txtred=$(tput setaf 1) # Red
txtgrn=$(tput setaf 2) # Green
txtylw=$(tput setaf 3) # Yellow
txtblu=$(tput setaf 4) # Blue