Configuring the socket for innobackupex to use

319 views
Skip to first unread message

James Beal

unread,
Dec 28, 2012, 8:30:52 AM12/28/12
to xtrabac...@googlegroups.com
I am trying to backup a mysql database where the socket does not live in the standard location.

Therefore when I run a backup I get :

121228 13:28:38  innobackupex: Connected to database with mysql child process (pid=27527)
innobackupex: Error: mysql child process has died: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
 ]
2012-12-28 13:28:42 +0000 [INFO] : [ XtraBackup step completed OK. Proceeding with apply-log step... ]
2012-12-28 13:28:44 +0000 [INFO] : [ Cleaning up files... ]
2012-12-28 13:28:44 +0000 [INFO] : [ Released lock on port 10000. ]
2012-12-28 13:28:44 +0000 [ERROR] : [ An error occurred while trying to perform the backup. Proceeding to log some details to help debug... ]
2012-12-28 13:28:44 +0000 [ERROR] : [ Error Caught: genericBackupTaker->takeFullBackupSnapshot: Error: There was an error applying logs - The process returned code 1. The output from the apply log process is as follows:

Given that I may have multiple instances on a single machine how do I configure xbm to take the path to a socket of a configuration file which can contain the path to the socket.


James Beal

unread,
Dec 28, 2012, 9:32:58 AM12/28/12
to xtrabac...@googlegroups.com

I have currently written a wrapper for bin/innobackupex which looks like

#!/bin/bash

/usr/bin/innobackupex --defaults-file=/home/adminmysql/conf/my.cnf  "$@"

Which looks like it will work if I put ~/bin first in the mysql users path…

Is there a better solution ? 

Joel Hanger

unread,
Mar 4, 2014, 11:23:17 AM3/4/14
to xtrabac...@googlegroups.com
I do all my installations outside the standard location... 
I ran into this issue while setting up perconan xtradb cluster with the innobackupex as the sst method 

In order to solve this I've just removed the old directory and symlinked to the root mysql installation directory. 
ie:
cd /var/lib/
rm -r /var/lib/mysql/
ln -s /path/to/mysql/ . 

i personally prefer symlinks over wrappers.
hope that helps, though it would be nice if innobackupex actually read the socket file location from my.cnf 
Reply all
Reply to author
Forward
0 new messages