clitools icon indicating copy to clipboard operation
clitools copied to clipboard

Add --defaults-file option to mysql/mysqldump

Open kitzberger opened this issue 8 years ago • 4 comments

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.

kitzberger avatar Sep 26 '17 10:09 kitzberger

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 avatar Oct 06 '17 20:10 mblaschke

@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 avatar Oct 07 '17 09:10 kitzberger

@kitzberger can u review this PR?

josefglatz avatar Sep 17 '19 09:09 josefglatz

@josefglatz, what's the point in me reviewing the patch that I wrote? ;-)

kitzberger avatar Jan 06 '20 08:01 kitzberger