diff --git a/tasks.go b/tasks.go index a7c1d4a..8967fcd 100644 --- a/tasks.go +++ b/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 { diff --git a/tasks_test.go b/tasks_test.go index 46f36ef..8e2a1e1 100644 --- a/tasks_test.go +++ b/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",