Browse Source

mysqldump password requires = on argument

main
IamTheFij 1 month ago
parent
commit
66a7881259
  1. 2
      tasks.go
  2. 2
      tasks_test.go

2
tasks.go

@ -124,7 +124,7 @@ func (t JobTaskMySQL) GetPreTask() ExecutableTask {
}
if t.Password != "" {
command = append(command, "--password", t.Password)
command = append(command, fmt.Sprintf("--password=%s", t.Password))
}
if t.NoTablespaces {

2
tasks_test.go

@ -160,7 +160,7 @@ func TestJobTaskSql(t *testing.T) {
},
validationErr: nil,
preBackup: "mysqldump --result-file ./simple.sql --host host --port 3306" +
" --user user --password pass --no-tablespaces db table1 table2",
" --user user --password=pass --no-tablespaces db table1 table2",
postBackup: "",
preRestore: "",
postRestore: "mysql --host host --user user --password pass < ./simple.sql",

Loading…
Cancel
Save