We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7738b9d commit 71d0c05Copy full SHA for 71d0c05
README.md
@@ -23,9 +23,14 @@ func main() {
23
config.Net = "tcp"
24
config.Addr = "your-hostname:your-port"
25
26
- dumpDir := "dumps" // you should create this directory
+ dumpDir := "dumps"
27
dumpFilenameFormat := fmt.Sprintf("%s-20060102T150405", config.DBName) // accepts time layout string and add .sql at the end of file
28
29
+ if err := os.MkdirAll(dumpDir, 0755); err != nil {
30
+ fmt.Println("Error mkdir:", err)
31
+ return
32
+ }
33
+
34
db, err := sql.Open("mysql", config.FormatDSN())
35
if err != nil {
36
fmt.Println("Error opening database:", err)
0 commit comments