--defaults-group getting ignored

Bug #1443968 reported by Zsolt Nagy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Confirmed
Medium
Unassigned
2.2
Confirmed
Medium
Sergei Glushchenko
2.3
Confirmed
Medium
Unassigned

Bug Description

--defaults-group=client_group1 not passed to xtrabackup

/usr/bin/innobackupex --defaults-file=/some_path/backup.my.cnf --defaults-group=client_group1 --slave-info --rsync --
compress --parallel=8 --compress-threads=8 /backup_path/

nnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona LLC and/or its affiliates 2009-2013. All Rights Reserved.

This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.

Get the latest version of Percona XtraBackup, documentation, and help resources:
http://www.percona.com/xb/p

150414 13:22:57 innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_file=/some_path/backup.my.cnf;mysql_read_default_group=xtrabackup' (using password: NO).
innobackupex: got a fatal error with the following stacktrace: at /usr/bin/innobackupex line 3003
    main::mysql_connect('abort_on_error', 1) called at /usr/bin/innobackupex line 1539
innobackupex: Error: Failed to connect to MySQL server: DBI connect(';mysql_read_default_file=/some_path/backup.my.cnf;mysql_read_default_group=xtrabackup','',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /usr/bin/innobackupex line 2987

Sample backup.my.cnf values:
[client_group1]
user = backupuser
password = "password"
socket = /socket_path/socket

Zsolt Nagy (zs-linux)
affects: percona-server → percona-xtrabackup
Zsolt Nagy (zs-linux)
description: updated
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Ignored by innobackupex.pl when it comes to connecting to MySQL.
Suggested fix:

--- a/storage/innobase/xtrabackup/innobackupex.pl
+++ b/storage/innobase/xtrabackup/innobackupex.pl
@@ -2940,7 +2940,7 @@ sub parse_connection_options {
         $con->{dsn} .= ";mysql_read_default_file=$option_defaults_extra_file";
     }

- $con->{dsn} .= ";mysql_read_default_group=xtrabackup";
+ $con->{dsn} .= ";mysql_read_default_group=$option_defaults_group";

     if ($option_mysql_password) {
         $con->{dsn_password} = "$option_mysql_password";

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

On the other hand, --defaults-group supposed to specify group to read server options from. It won't be correct to use it as an argument to specify the group to read connection options from. In 2.2 we still read server options from my.cnf, at least in xtrabackup binary.

Probably different option might be added.

Revision history for this message
Zsolt Nagy (zs-linux) wrote :

According to 2.2.6 release note:
"Percona XtraBackup now reads server options from SHOW VARIABLES rather than my.cnf configuration file"
http://www.percona.com/doc/percona-xtrabackup/2.2/release-notes/2.2/2.2.6.html

and it works, more or less
https://bugs.launchpad.net/percona-xtrabackup/+bug/1443991

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-722

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

Other bug subscribers

Remote bug watches

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