Hi Jrivera
thanks for your advice, but i have tried before, it’s not work, pls ref the below
[root@nemrry ~]# cd /var/lib/mysql/
[root@nemrry mysql]# ll
total 0
lrwxrwxrwx 1 mysql mysql 15 Apr 5 21:42 mysql.sock → /tmp/mysql.sock
[root@nemrry mysql]# cd
[root@nemrry ~]# cat /etc/my.cnf
For advice on how to change settings please see
*** DO NOT EDIT THIS FILE. It’s a template which will be copied to the
*** default location during install, and will be replaced if you
*** upgrade to a newer version of MySQL.
[mysqld]
Remove leading # and set to the amount of RAM for the most important data
cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
innodb_buffer_pool_size = 128M
Remove leading # to turn on a very important data integrity option: logging
changes to the binary log between backups.
log_bin=/usr/local/mysql/mysql_bin_log/mysqlbin.log
log_bin_index=/usr/local/mysql/mysql_bin_log/mysqlbin.index
These are commonly set, remove the # and set as required.
basedir = …
datadir = /data/mydata
port = …
server_id = …
socket =/tmp/mysql.sock
Remove leading # to set options mainly useful for reporting servers.
The server defaults are faster for transactions and fast SELECTs.
Adjust sizes as needed, experiment to find the optimal values.
join_buffer_size = 128M
sort_buffer_size = 2M
read_rnd_buffer_size = 2M
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLE S
[root@nemrry ~]# innobackupex --user=root --password=mysql --socket=/tmp/mysql.sock /root/backup/
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:
http://www.percona.com/xb/p
150406 14:25:26 innobackupex: Connecting to MySQL server with DSN ‘dbi:mysql:;mysql_read_default_group=xtrabackup;my sql_socket=/tmp/mysql.sock’ as ‘root’ (using password: YES).
innobackupex: got a fatal error with the following stacktrace: at /usr/bin/innobackupex line 3003.
main::mysql_connect(‘abort_on_error’, 1) called at /usr/bin/innobackupex line 1539
innobackupex: Error: Failed to connect to MySQL server: DBI connect(‘;mysql_read_default_group=xtrabackup;mysq l_socket=/tmp/mysql.sock’,‘root’,…) failed: Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2) at /usr/bin/innobackupex line 2987.
[root@nemrry ~]# service mysqld status
SUCCESS! MySQL running (2822)
[root@nemrry ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.22-log Source distribution
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql> show variables like ‘socket’;
±--------------±----------------+
| Variable_name | Value |
±--------------±----------------+
| socket | /tmp/mysql.sock |
±--------------±----------------+
1 row in set (0.01 sec)
mysql>
this issue still exist, i don’t know why for innobackupex can’t connect to the MySQL server, but MySQL server is running normally,appreciated you could help me to find out the root cause, thanks!