zoukankan      html  css  js  c++  java
  • xtrabackup 链接不上MySQL的问题

    先看问题:

    [root@localhost ~]# innobackupex --user=root --password=131417 /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

    150712 22:29:59 innobackupex: Executing a version check against the server...
    150712 22:29:59 innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup' as 'root' (using password: YES).
    innobackupex: got a fatal error with the following stacktrace: at /usr/bin/innobackupex line 3011.
    main::mysql_connect('abort_on_error', 1) called at /usr/bin/innobackupex line 1551
    innobackupex: Error: Failed to connect to MySQL server: DBI connect(';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 2995.
    150712 22:29:59 innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup' as 'root' (using password: YES).
    innobackupex: got a fatal error with the following stacktrace: at /usr/bin/innobackupex line 3011.
    main::mysql_connect('abort_on_error', 1) called at /usr/bin/innobackupex line 1570
    innobackupex: Error: Failed to connect to MySQL server: DBI connect(';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 2995.

    --------------------------------------------------------------------------------------------------------------------

    由上面可知道,innobackupex是通过socket的方式链接上去的。想办法使它不走socket就可以了。

    innobackupex --user=root --password=131417 --host=127.0.0.1 /backup

  • 相关阅读:
    面向对象设计技巧[Object Oriented Design Tips] 2
    面向对象设计的技巧[Object Oriented Design Tips]1
    36家示范性软件学院验收的得分排名顺序
    解决windows系统乱码(其实是法语)
    [maven] maven/appfuse 常用命令介绍
    [plsql] win7/64位 PL/SQL登录时报 ora12154无法解析指定的连接标识
    [maven] pom.xml常用配置介绍
    web.xml中classpath:和classpath*:的区别
    [http] 深入理解HTTP消息头
    [Hibernate] Hibernate连接mysql示范
  • 原文地址:https://www.cnblogs.com/JiangLe/p/4641710.html
Copyright © 2011-2022 走看看