afrase / mysqldumpsplit Goto Github PK
View Code? Open in Web Editor NEWSplit a mysqldump into separate files for each table.
License: MIT License
Split a mysqldump into separate files for each table.
License: MIT License
Is it nessary to add head and tail to every single sql?
I mean the /*!40101 SET @OLD_CHARACTER_SET_xxxxxxxxxxxxxxxxxxxx and so on.
And by the way I built the project and have some try. I think it is very useful.
I was trying to split a 19GB mysql dump file which has 920 tables.
I installed via homebrew
version = 0.1.0
mysqldumpsplit -i mysqldump.sql -o splitted/
2018/03/01 17:04:01 outputing all tables to splitted/
2018/03/01 17:04:01 begin processing mysqldump.sql
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x280 pc=0x10af637]
goroutine 17 [running]:
compress/gzip.(*Reader).Read(0x0, 0xc4200c8000, 0x2000, 0x2000, 0x1, 0x101650100000000, 0x0)
/usr/local/go/src/compress/gzip/gunzip.go:247 +0x37
bufio.(*Reader).fill(0xc420058120)
/usr/local/go/src/bufio/bufio.go:97 +0x11a
bufio.(*Reader).ReadSlice(0xc420058120, 0xc42004a20a, 0xc4200c8000, 0xc420046f40, 0x10b35db, 0x10c8fc0, 0x2000)
/usr/local/go/src/bufio/bufio.go:338 +0x2c
bufio.(*Reader).ReadBytes(0xc420058120, 0x116a20a, 0xc42000c030, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/bufio/bufio.go:416 +0x6b
bufio.(*Reader).ReadString(0xc420058120, 0xc42005810a, 0x3, 0xc420018090, 0x22, 0x0)
/usr/local/go/src/bufio/bufio.go:456 +0x38
github.com/afrase/mysqldumpsplit/msds.LineReader(0xc42000c030, 0xc420076060, 0xc4200760c0, 0xc420076240, 0xc4200761e0, 0xc420076180, 0xc420076120)
/go/src/github.com/afrase/mysqldumpsplit/msds/mysqldumpsplit.go:49 +0x47
created by main.main
/go/src/github.com/afrase/mysqldumpsplit/main.go:86 +0x4a5
segmentation fault on mac m1.
>> mysqldumpsplit -i "sqlFile.sql" -o "./outputFolderPath"
>> zsh: segmentation fault mysqldumpsplit -i -o
downloaded straight from homebrew. os = Ventura 13.0.1.
this project helps me a lot ! may you add those futures ?
1, dump per table as .CSV
some individual table files are still tool huge for importing to mysql use "source" command, i have to turn the .SQL files to .CSV so i will be able to use "load file";
2,use wildcard characters for skipData parameter
so i can skip all the tables which contains word like "bak" in name.
thank you very much ! Agin!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.