Error: Failed to connect to MySQL server: DBI connect(';

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
简介: <p><br></p> <p></p> <p style="margin:10px auto; font-family:Verdana,Arial,Helvetica,sans-serif; font-size:14px; line-height:25px"> 先看问题:</p> <p style="margin:10px auto; font-family:Verdana,Ari


先看问题:

[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 -host=192.168.199.147 --user=jsb --password=jsb --defaults-file=/etc/my.cnf /data/backup 

 innobackupex  + -host=本地路径  /data/backup是自己新建的备份露露


相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助 &nbsp; &nbsp; 相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
4月前
|
SQL 关系型数据库 MySQL
使用Flink CDC从SQL Server同步数据到MySQL
使用Flink CDC从SQL Server同步数据到MySQL
148 1
|
3月前
|
关系型数据库 MySQL
ERROR 1449 (HY000): The user specified as a definer (‘mysql.infoschema‘@‘localhost‘) does not exist
ERROR 1449 (HY000): The user specified as a definer (‘mysql.infoschema‘@‘localhost‘) does not exist
21 0
|
3月前
|
SQL 数据采集 关系型数据库
如何解决MySQL报错 You have an error in your SQL syntax; check the manual that corresponds to your MySQL?
如何解决MySQL报错 You have an error in your SQL syntax; check the manual that corresponds to your MySQL?
|
6天前
|
关系型数据库 MySQL Linux
Linux联网安装MySQL Server
Linux联网安装MySQL Server
19 0
|
21天前
|
关系型数据库 MySQL 数据安全/隐私保护
MySQL连接ERROR 2059 (HY000): Authentication plugin ‘caching_sha2_password‘ cannot be loaded
MySQL连接ERROR 2059 (HY000): Authentication plugin ‘caching_sha2_password‘ cannot be loaded
26 0
|
2月前
|
关系型数据库 MySQL 数据库
Host 'XXX' is not allowed to connect to this MySQL server 解决方案
Host 'XXX' is not allowed to connect to this MySQL server 解决方案
|
3月前
|
关系型数据库 MySQL 数据库
Client does not support authentication protocol requested by server; consider upgrading MySQL client
Client does not support authentication protocol requested by server; consider upgrading MySQL client
|
4月前
|
消息中间件 关系型数据库 MySQL
在kafka connect 同步 mysql 主从数据库
在kafka connect 同步 mysql 主从数据库
45 0
|
4月前
|
关系型数据库 MySQL 数据库
远程连接mysql报错:1130 - Host XXX is not allowed to connect to this MySQL server
远程连接mysql报错:1130 - Host XXX is not allowed to connect to this MySQL server
83 0
|
4月前
|
关系型数据库 MySQL 数据安全/隐私保护
(解决)Can‘t connect to MySQL server on ‘localhost3306‘ (10061)
(解决)Can‘t connect to MySQL server on ‘localhost3306‘ (10061)
39 0