innobackupex does not read user,password options from ~/.my.cnf

Bug #1092235 reported by Bryan Aldridge on 2012-12-19
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup
Low
Sergei Glushchenko
2.2
Low
Hrvoje Matijakovic
2.3
Low
Sergei Glushchenko

Bug Description

# rpm -q percona-xtrabackup:
percona-xtrabackup-2.0.3-470.rhel5

# uname -a
Linux localhost 2.6.18-308.24.1.el5 #1 SMP Wed Nov 21 11:42:14 EST 2012 x86_64 x86_64 x86_64 GNU/Linux

I cannot seem to get innobackupex to read the username, password values set in ~/.my.cnf (/root/.my.cnf), in this case.

# cat /root/.my.cnf
[xtrabackup]
user=root
password=abc123

# whoami
root

[root@localhost]# /usr/bin/perl /usr/bin/innobackupex --incremental /local/backups/xtrabackups_inc/20121219/xtra_backup_inc_hr12 --no-timestamp --incremental-basedir=/local/backups/xtrabackups_inc/20121219/xtra_backup_inc_hr10

The backup dies with the following:

innobackupex: Error: mysql child process has died: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

If I change the /root/.my.cnf file to
[client]
user=root
password=abc123

it works, but I'd like it to obey the [xtrabackup] section, as the documentation suggests it does.

Tags: doc Edit Tag help

Related branches

Alexey Kopytov (akopytov) wrote :

I don't see a way to fix this until we either merge innobackupex with xtrabackup, or at least fix innobackupex to use Perl DBI instead of talking to the server through the command line client.

The command line client has hardcoded groups ("mysql" and "client"). So I suggest we document that connection-related parameters are only recognized in those groups in configuration files.

tags: added: doc
Changed in percona-xtrabackup:
status: New → Confirmed
assignee: nobody → Hrvoje Matijakovic (hrvojem)
status: Confirmed → Triaged
importance: Undecided → Low
Changed in percona-xtrabackup:
status: Triaged → In Progress
Changed in percona-xtrabackup:
status: In Progress → Fix Committed
Stewart Smith (stewart) on 2013-01-22
Changed in percona-xtrabackup:
status: Fix Committed → Fix Released

For 2.3 ~/.mylogin.cnf should be used to store password, see bug 1388122

Please disread my previous comment. Storing passwords in ~/.my.cnf works with xtrabackup 2.3.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related blueprints