Not the answer you need?
Register and ask your own question!

Run hot backup WITHOUT sockets file

anzianojacksonanzianojackson EntrantInactive User Role Beginner
I recently upgraded an application we use and percona is used for hot backups. When I installed it, it deleted the mysql.sock file. I can't stop this database (production system) until later, but I want to make a hot backup now before I can stop mysql/mysqld, recreate the mysql.sock file and start it back up.

Is there any way to force a backup without using a socket file? Please help.

# innobackupex --defaults-file=/app/appd/383/db/db.cnf --stream=tar --port=3388 --user=root --password='password' db/data | gzip > /app/appd/backup/appd-3-9-3-2-backup-1216.tar.gz

141120 12:16:34 innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_file=/app/appd/383/db/db.cnf;mysql_read_default_group=xtrabackup;port=3388' as 'root' (using password: YES).
innobackupex: Error: Failed to connect to MySQL server: DBI connect(';mysql_read_default_file=/app/appd/383/db/db.cnf;mysql_read_default_group=xtrabackup;port=3388','root',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /usr/bin/innobackupex line 2995

In the db.cnf file, there is no socket=/blah/blah/mysql.sock so I don't know where it's grabbing that. Any ideas? I'd prefer not to do a mysql dump and lose all the integrity if I do need to restore from this backup. Most recent hot backup is from a week ago.


  • scott.nemesscott.nemes MySQL Sage Current User Role Patron
    Hi anzianojackson;

    Try adding --host= to your innobackupex command. Theoretically that should force it to use TCP instead of trying to use the socket.

  • anzianojacksonanzianojackson Entrant Inactive User Role Beginner
    That did it. Thanks!!
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.