# Access error when run xtrabackup Failed to connect to MySQL server: DBI connect

**URL:** <https://forums.percona.com/t/access-error-when-run-xtrabackup-failed-to-connect-to-mysql-server-dbi-connect/7422>\
**Category:** Percona XtraBackup\
**Created:** [February 11, 2020, 4:46am UTC](https://forums.percona.com/t/access-error-when-run-xtrabackup-failed-to-connect-to-mysql-server-dbi-connect/7422 "2020-02-11T04:46:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tatyana\_Alexeyev](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@Tatyana\_Alexeyev](https://forums.percona.com/u/Tatyana_Alexeyev)\
**Post date:** [February 11, 2020, 4:46am UTC](https://forums.percona.com/t/access-error-when-run-xtrabackup-failed-to-connect-to-mysql-server-dbi-connect/7422/1 "2020-02-11T04:46:26Z")

</div>

Hello, I have the following error while try to run xtrabackup on AWS ec2 host:

[talexey@ip-10-6-14-72.us-east-2.compute.internal (aws\_main) lib]$xtrabackup --backup --host=[dvspinm1.prod.ch4.s.com](http://dvspinm1.prod.ch4.s.com) --user=back\_user -password=XXX --port=3306 --socket=/opt/mysql/SPINM1/mysql.sock --target\_dir=/home/talexey  
xtrabackup: recognized server arguments:  
xtrabackup: recognized client arguments: --backup=1 --host=[dvspinm1.prod.ch4.s.com](http://dvspinm1.prod.ch4.s.com) --user=back\_user–password=\* --port=3306 --sot-dir=/home/talexey  
200211 03:50:38 version\_check Connecting to MySQL server with DSN ‘dbi:mysql:;mysql\_read\_default\_group=xtrabackup;host=dvspinm1.p/mysql/SPINM1/mysql.sock’ as ‘data\_owner’ (using password: YES).  
Failed to connect to MySQL server: DBI connect(‘;mysql\_read\_default\_group=xtrabackup;[host=dvspinm1.prod.ch4.s.com](http://host=dvspinm1.prod.ch4.s.com);port=3306;mysql\_a\_owner’,…) failed: Access denied for user ‘back\_user’@‘ip-10-6-14-72.us-east-2.compute.internal’ (using password: YES) at - li  
200211 03:50:38 Connecting to MySQL server host: [dvspinm1.prod.ch4.s.com](http://dvspinm1.prod.ch4.s.com), user: back\_user, password: set, port: 3306, socket: /op  
Failed to connect to MySQL server: Access denied for user ‘data\_owner’@‘ip-10-6-14-72.us-east-2.compute.internal’ (using password:

I can connect to MySQL from this ec2 machine:  
[talexey@ip-10-6-14-72.us-east-2.compute.internal (aws\_main) ~]$ !my  
mysql -uback\_user -pXXX -hdvspinm1.prod.ch4.s.com  
Warning: Using a password on the command line interface can be insecure.  
Welcome to the MySQL monitor. Commands end with ; or \g.  
Your MySQL connection id is 497711339  
Server version: 5.6.34-log MySQL Community Server (GPL)

Copyright (c) 2000, 2020, 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\> select @@socket;  
±-----------------------------+  
| @@socket |  
±-----------------------------+  
| /opt/mysql/SPINM1/mysql.sock |  
±-----------------------------+  
1 row in set (0.01 sec)

I also can run mysqldump without any issues on this ec2 instance.

MySQL version: 5.6.34

xtrabackup --version  
xtrabackup: recognized server arguments:  
xtrabackup version 2.4.18 based on MySQL server 5.7.26 Linux (x86\_64) (revision id: 29b4ca5)

Can you please let me know why do I have this error?  
Thanks,  
Tanya

---

<div class="post-metadata">

**Author:** ![lorraine.pocklington](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/lorraine.pocklington/32/37_2.png) [@lorraine.pocklington](https://forums.percona.com/u/lorraine.pocklington)\
**Post date:** [February 11, 2020, 12:19pm UTC](https://forums.percona.com/t/access-error-when-run-xtrabackup-failed-to-connect-to-mysql-server-dbi-connect/7422/2 "2020-02-11T12:19:41Z")

</div>

Can I just check if this is an error in setting up a new backup, or an error that has started appearing when it was previously working fine?  
thanks!
