MySQL 5.6 now adds a warning about putting a password in the command line of a mysqldump command. The supported method is now to use mysql_config_edit to create a login path to your server and then call that. The option should be added to choose between classic user/pass auth and a login path to suppress the warnings that show up in the logs as a result.
I create an patch for version automysqlbackup-v3.0_rc6
It add's a var loginpath to the default config, you need to add it to your own config like:
CONFIG_mysql_dump_loginpath='client'
Where "client" is the name you gave it with:
mysql_config_editor set --host=localhost --user=puthereusername --password
(You can use the -G option to use another name than "client")
Put the patch in the same directory as the automysqlbackup script and run
patch -i automysqlbackup-loginpath.patch
@Teun
Good work on this patch. I've noticed that it breaks when you don't use 'client' for the login-path. The mysql, or maybe mysqlshow, command doesn't recognize the login-path argument and, by default, tries the 'client'. If your mylogin.cnf happens to define a client, it continues, but in an undesired way. If I can root out the problem, I'll post a update.
New patch attached below. In the config file, add a line like:
CONFIG_mysql_dump_loginpath='backup'
but replace backup with an appropriate profile from your .mylogin.cnf file. I created my backup profile with
mysql_config_editor set --login-path=backup --user=root --host=localhost --password
Put the patch in the same directory as the automysqlbackup script and run
patch -bi automysqlbackup-loginpatch-1.patch
And, if performance_schema exists in your databases, don't forget to add it to the CONFIG_DB_exclude list.
Patch confirmed to be working with Ubuntu Xenial and MySQL 5.7.17.
Thanks a lot, Ian and Teun!
Last edit: larsen255 2017-02-28