文件名称:go-mysqldump:在Go中创建SQL转储而无需外部依赖
文件大小:8KB
文件格式:ZIP
更新时间:2024-06-04 11:24:32
Go
转MYSQL转储 在不依赖mysqldump CLI的情况下,在Go中创建MYSQL转储。 简单的例子 package main import ( "database/sql" "fmt" "github.com/JamesStewy/go-mysqldump" _ "github.com/go-sql-driver/mysql" ) func main () { // Open connection to database username := "your-user" password := "your-pw" hostname := "your-hostname" port := "your-port" dbname := "your-db" dumpDir := "dumps" // you should create this director
【文件预览】:
go-mysqldump-master
----.travis.yml(98B)
----doc.go(1KB)
----LICENSE(1KB)
----mysqldump.go(1KB)
----.gitignore(9B)
----dump_test.go(10KB)
----README.md(1KB)
----dump.go(5KB)
----Gopkg.toml(614B)
----Gopkg.lock(438B)