# innobackupex: Error: Failed to connect to MySQL server:

**URL:** <https://forums.percona.com/t/innobackupex-error-failed-to-connect-to-mysql-server/3867>\
**Category:** Percona XtraBackup\
**Created:** [November 11, 2014, 10:01am UTC](https://forums.percona.com/t/innobackupex-error-failed-to-connect-to-mysql-server/3867 "2014-11-11T10:01:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JBeason](https://avatars.discourse-cdn.com/v4/letter/j/cdc98d/32.png) [@JBeason](https://forums.percona.com/u/JBeason)\
**Post date:** [November 11, 2014, 10:01am UTC](https://forums.percona.com/t/innobackupex-error-failed-to-connect-to-mysql-server/3867/1 "2014-11-11T10:01:36Z")

</div>

Trying to run innobackupex and receiving the following error message:  
InnoDB 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:  
[url][http://www.percona.com/xb/ubuntu[/url]](http://www.percona.com/xb/ubuntu%5B/url%5D)

141111 15:14:01 innobackupex: Connecting to MySQL server with DSN ‘dbi:mysql:;mysql\_read\_default\_group=xtrabackup’ as ‘dba’ (using password: YES).  
innobackupex: Error: Failed to connect to MySQL server: DBI connect(‘;mysql\_read\_default\_group=xtrabackup’,‘dba’,…) failed: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) at /usr/bin/innobackupex line 2945.

Here is some system information:  
mysql --version  
mysql Ver 14.14 Distrib 5.6.19, for debian-linux-gnu (x86\_64) using EditLine wrapper

uname -a  
Linux ip-172- **-** -\*\*\* 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86\_64 x86\_64 x86\_64 GNU/Linux

cat /etc/\*release  
DISTRIB\_ID=Ubuntu  
DISTRIB\_RELEASE=14.04  
DISTRIB\_CODENAME=trusty  
DISTRIB\_DESCRIPTION=“Ubuntu 14.04.1 LTS”  
NAME=“Ubuntu”  
VERSION=“14.04.1 LTS, Trusty Tahr”  
ID=ubuntu  
ID\_LIKE=debian  
PRETTY\_NAME=“Ubuntu 14.04.1 LTS”  
VERSION\_ID=“14.04”  
HOME\_URL=“[http://www.ubuntu.com/](http://www.ubuntu.com/)”  
SUPPORT\_URL=“[http://help.ubuntu.com/](http://help.ubuntu.com/)”  
BUG\_REPORT\_URL=“[http://bugs.launchpad.net/ubuntu/](http://bugs.launchpad.net/ubuntu/)”

aptitude show libdbd-mysql-perl  
Package: libdbd-mysql-perl  
State: installed  
Automatically installed: yes  
Version: 4.025-1  
Priority: optional  
Section: perl  
Maintainer: Ubuntu Developers \<ubuntu-devel-discuss@lists.ubuntu.com\>  
Architecture: amd64  
Uncompressed Size: 314 k  
Depends: perl (\>= 5.18.1-4build1), perl-dbdabi-94, perlapi-5.18.1, libc6 (\>= 2.4), libmysqlclient18 (\>= 5.5.13-1), libdbi-perl  
Description: Perl5 database interface to the MySQL database  
DBD::mysql is the Perl5 Database Interface driver for the MySQL database. In other words: DBD::mysql is an interface between the Perl programming language and the MySQL programming API that comes with the MySQL relational database  
management system. Most functions provided by this programming API are supported. Some rarely used functions are missing, mainly because noone ever requested them. However supported features include: compression of data between server  
and client; timeouts; SSL; prepared statement support; server administration such as creating and dropping databases and restarting the server; auto-reconnection; utf8; bind type guessing; bind comment placeholders; automated insert  
ids; transactions; multiple result sets and multithreading.  
Homepage: [url][https://metacpan.org/release/DBD-mysql[/url]](https://metacpan.org/release/DBD-mysql%5B/url%5D)

---

<div class="post-metadata">

**Author:** ![mirfan](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mirfan/32/16890_2.png) [@mirfan](https://forums.percona.com/u/mirfan)\
**Post date:** [November 15, 2014, 8:14am UTC](https://forums.percona.com/t/innobackupex-error-failed-to-connect-to-mysql-server/3867/2 "2014-11-15T08:14:19Z")

</div>

It seems that your credentials are not correct for innobackupex command. Would you able to connect manually ?

---

<div class="post-metadata">

**Author:** ![JBeason](https://avatars.discourse-cdn.com/v4/letter/j/cdc98d/32.png) [@JBeason](https://forums.percona.com/u/JBeason)\
**Post date:** [November 17, 2014, 9:55am UTC](https://forums.percona.com/t/innobackupex-error-failed-to-connect-to-mysql-server/3867/3 "2014-11-17T09:55:23Z")

</div>

mirfan, I verified that I do have the correct credentials. Thank you for your input.

I stumbled onto the solution. I needed to add the -host [ip address] variable to get it to connect.
