Add --defaults-file option to mysql/mysqldump
Sometimes it's not possible to place the .my.cnf file (containing the db password) into the users home folder on remote. So it'll be nice to specify a different location for that file.
The option mysql.mysqldump.options only works for mysqldump and not the mysql command that checks the db size and tablenames before syncing. Plus it doesn't add the --defaults-file option as first option which it needs to work properly.
So I introduced this option separately.
Wouldn't it be better to have some general options? Of you need other switches/parameters this can be defined as mysqldump-opts or something like that?
PS: already implemented in this way in https://github.com/webdevops/go-sync :)
@mblaschke sure. But, as I already mentioned, this parameter needs to be the first one in order to work, whereas the mysqldump.options adds the options to the end of the command.
@kitzberger can u review this PR?
@josefglatz, what's the point in me reviewing the patch that I wrote? ;-)