I have problem with InnoDB on mine server so I dumped all files and want to change in SQL file table type from InnoDB to MyISAM, but can’t because file size is 5.3 GB. No one editor can’t edit so big file over SSH, so I found amazing solution for that:
1 | split -b 10000k mysqldump.sql |
You split one file by pieces, then edit piece what you want and when can make one file, by this command:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | cat xa* > mysqldump.sql SYNOPSIS split [OPTION]... [INPUT [PREFIX]] -a, --suffix-length=N use suffixes of length N (default 2) -b, --bytes=SIZE put SIZE bytes per output file -C, --line-bytes=SIZE put at most SIZE bytes of lines per output file -d, --numeric-suffixes use numeric suffixes instead of alphabetic -l, --lines=NUMBER put NUMBER lines per output file |
Hope that idea helps you too!