cmd init
cmd := exec.Command("mysqldump",
"--column-statistics=0",
"--default-character-set=utf8",
"-P", port,
"-h", host,
"-u", username,
fmt.Sprintf("-p'%s'", password),
dbname)
error text i get
mysqldump: [Warning] Using a password on the command line interface can be insecure. mysqldump: Got error: 1045: Access denied for user 'user'@'ipaddress' (using password: YES) when trying to connect
cmd.String() output
/usr/bin/mysqldump --column-statistics=0 --default-character-set=utf8 -P port -h host -u username -p'password' dbname
when I execute cmd.String() output in terminal on same machine, everything works as expected. What reasons can be for this behavior?