mysql使用innobackupex报错

使用innobackupex备份时,报错信息如下:mysql]$innobackupex --user=root --password=root.admin --defaults-file=/etc/my.cnf /home/mysql/bak/innobackup-bak/InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oyand Percona LLC and/or its aff...显示全部
使用innobackupex备份时,报错信息如下:mysql]$innobackupex --user=root --password=root.admin --defaults-file=/etc/my.cnf /home/mysql/bak/innobackup-bak/

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

150723 16:40:13  innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_file=/etc/my.cnf;mysql_read_default_group=xtrabackup' as 'root'  (using password: YES).
innobackupex: got a fatal error with the following stacktrace: at /usr/bin/innobackupex line 2995
        main::mysql_connect('abort_on_error', 1) called at /usr/bin/innobackupex line 1530
innobackupex: Error: Failed to connect to MySQL server: DBI connect(';mysql_read_default_file=/etc/my.cnf;mysql_read_default_group=xtrabackup','root',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /usr/bin/innobackupex line 2979



根据报错信息有个解决方式就是在/var/lib/mysql/下建立个软连接,如 ln -s /file/mysql/bin/mysql.sock /var/lib/mysql/mysql.sock,除了这个还能怎么处理?修改脚本的方式有没?收起
参与7

查看其它 3 个回答詹氏归来的回答

詹氏归来詹氏归来数据库管理员IT公司
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)这个提示感觉是连不上数据库,能用root和root.admin来登陆mysql吗?
互联网服务 · 2015-07-23
浏览1230

回答者

詹氏归来
数据库管理员IT公司

詹氏归来 最近回答过的问题

回答状态

  • 发布时间:2015-07-23
  • 关注会员:1 人
  • 回答浏览:1230
  • X社区推广