xb_opt_mysql_sock and mysql_sock changed to "None", so they don't override command with wrong socket. Fix for https://github.com/dotmanila/pyxbackup/issues/36
failed, as expected, and incorrect socket was used (meaning it was not overridden by the tool):
[root@tmp-centos ~]# /usr/bin/python /root/bin/pyxbackup full
[10/09/2017 20:24:41] INFO: Running FULL backup, started at 2017-10-09 20:24:41
[10/09/2017 20:24:41] INFO: Running xtrabackup with command: xtrabackup --defaults-file=/root/.my.cnf --host=localhost --no-timestamp --backup --parallel=4 --rsync --binlog-info=on --target-dir /backup/dbbackup/data04/backups/full/2017_10_09-20_24_41
[10/09/2017 20:24:43] ERROR: Command was: xtrabackup --defaults-file=/root/.my.cnf --host=localhost --no-timestamp --backup --parallel=4 --rsync --binlog-info=on --target-dir /backup/dbbackup/data04/backups/full/2017_10_09-20_24_41
[10/09/2017 20:24:43] ERROR: Error: process exited with status Non-zero exit of innobackupex command!
[10/09/2017 20:24:43] ERROR: Please check innobackupex log file at /backup/dbbackup/data04/work/2017_10_09-20_24_41-innobackupex-backup.log
[root@tmp-centos ~]# cat /backup/dbbackup/data04/work/2017_10_09-20_24_41-innobackupex-backup.log
171009 20:24:41 version_check Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup;host=localhost;mysql_socket=/var/lib/mysql/mysql2.sock' as 'root' (using password: YES).
Failed to connect to MySQL server: DBI connect(';mysql_read_default_group=xtrabackup;host=localhost;mysql_socket=/var/lib/mysql/mysql2.sock','root',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql2.sock' (2) at - line 1314.
171009 20:24:41 Connecting to MySQL server host: localhost, user: root, password: set, port: not set, socket: /var/lib/mysql/mysql2.sock
Failed to connect to MySQL server: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql2.sock' (2).
Commit comment:
xb_opt_mysql_sock and mysql_sock changed to "None", so they don't override command with wrong socket. Fix for https://github.com/dotmanila/pyxbackup/issues/36
Tests
custom my.cnf with no socket option
worked ok.
custom my.cnf with socket option
worked ok
custom my.cnf with socket option set to incorrect socket
failed, as expected, and incorrect socket was used (meaning it was not overridden by the tool):