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

Bug #1092235 reported by Bryan Aldridge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Fix Released
Low
Sergei Glushchenko
2.2
Fix Released
Low
Hrvoje Matijakovic
2.3
Fix Released
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

Related branches

Revision history for this message
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)
Changed in percona-xtrabackup:
status: Fix Committed → Fix Released
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

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

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

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

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXB-861

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

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.