Solve the socket error when XtraBackup is backed up

Source: Internet
Author: User
Tags socket error percona

Solve the socket error when XtraBackup is backed up

When XtraBackup is used for the uat database created by the company today, an error is reported. Sort the solution and make a note:

Server System:

[root@uat-mysql-master tmp]# cat /etc/RedHat-release   CentOS Linux release 7.3.1611 (Core)  Mysql version: mysql>  select  version(); + ----------------+ | version()      | + ----------------+ | 5.5.47-cll-lve | + ----------------+ 1 row  in  set  (0.00 sec)  The following error is reported: [root@uat-mysql-master tmp]# innobackupex  --defaults-file=/etc/my.cnf --user=backup --password=****** --stream=tar /home/backup/ | gzip >/home/backup/`date +%F_%H-%M-%S`.tar.gz 171120 17:10:42 innobackupex: Starting the backup operation IMPORTANT: Please  check  that the backup run completes successfully.             At  the  end  of  a successful backup run innobackupex             prints  "completed OK!" .     171120 17:10:42  version_check Connecting  to  MySQL server  with  DSN  'dbi:mysql:;mysql_read_default_group=xtrabackup'  as  'backup' (using  password : YES). Failed  to  connect  to  MySQL server: DBI  connect ( ';mysql_read_default_group=xtrabackup' , 'backup' ,...) failed: Can 't connect to local MySQL server through socket ' /var/lib/mysql/mysql.sock ' (2) at - line 1314. 171120 17:10:42 Connecting to MySQL server host: localhost, user: backup, password: set, port: not set, socket: not set Failed to connect to MySQL server: Can' connect  to  local  MySQL server through socket  '/var/lib/mysql/mysql.sock'  (2).





Remarks: some people on the Internet say that

# find / -name "mysql.sock"

Check the socket parameter and modify it in the configuration file. However, the problem may not be solved after the test.

For more XtraBackup tutorials, see the following:

Use Xtrabackup to back up MySQL

Percona Xtrabackup Installation

Percona XtraBackup Installation Introduction

Use XtraBackup to back up a MySQL database

Use Xtrabackup for MySQL database full backup and full Backup Recovery

XtraBackup backup Principles and Practices

Percona XtraBackup for full backup & Incremental backup and recovery

XtraBackup backup Principles and Practices


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.