# Xtrabackup - Failed to connect to MySQL server: SSL connection error: unknown error number

**URL:** <https://forums.percona.com/t/xtrabackup-failed-to-connect-to-mysql-server-ssl-connection-error-unknown-error-number/14533>\
**Category:** Percona XtraBackup\
**Tags:** mysql, percona\
**Created:** [February 22, 2022, 8:28pm UTC](https://forums.percona.com/t/xtrabackup-failed-to-connect-to-mysql-server-ssl-connection-error-unknown-error-number/14533 "2022-02-22T20:28:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matias\_Insaurralde](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matias_insaurralde/32/5937_2.png) [@Matias\_Insaurralde](https://forums.percona.com/u/Matias_Insaurralde)\
**Post date:** [February 22, 2022, 8:28pm UTC](https://forums.percona.com/t/xtrabackup-failed-to-connect-to-mysql-server-ssl-connection-error-unknown-error-number/14533/1 "2022-02-22T20:28:06Z")

</div>

I want to backup a mysql cluster (version 5.7.33-36) using xtrabackup (everything runs on kubernetes). I have a pod that has xtrabackup 2.4 installed, but when I run the command **`xtrabackup --user=root --password=<password> --host=mysql.<namespace> --port=3306 --backup --target-dir=/tmp`** I get the error _ **`Failed to connect to MySQL server: SSL connection error: unknown error number.`** _  
I have also tried the options --ssl-mode=DISABLED, --ssl=FALSE, --initialize-insecure, --skip-ssl, --skip-networking but nothing seems to work, every time I try I get the same error. If I try with the command `mysql -u root -p<password> -h mysql.<namespace>` I can connect to mysql without problems.

---

<div class="post-metadata">

**Author:** ![Marcelo\_Altmann](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/marcelo_altmann/32/11299_2.png) [@Marcelo\_Altmann](https://forums.percona.com/u/Marcelo_Altmann)\
**Post date:** [February 22, 2022, 8:33pm UTC](https://forums.percona.com/t/xtrabackup-failed-to-connect-to-mysql-server-ssl-connection-error-unknown-error-number/14533/2 "2022-02-22T20:33:10Z")

</div>

Hi Matias,

The version of xtrabackup you are running is old. For MySQL 5.7 you should be using 2.4 series (as the opposite of 2.2).

Also, another thing to have in mind is that xtrabackup needs physical access to the database files, meaning you need to run it on the same pod/instance as the database.

---

<div class="post-metadata">

**Author:** ![Matias\_Insaurralde](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matias_insaurralde/32/5937_2.png) [@Matias\_Insaurralde](https://forums.percona.com/u/Matias_Insaurralde)\
**Post date:** [February 22, 2022, 8:39pm UTC](https://forums.percona.com/t/xtrabackup-failed-to-connect-to-mysql-server-ssl-connection-error-unknown-error-number/14533/3 "2022-02-22T20:39:18Z")

</div>

Sorry, it was a typo. I have version 2.4 installed, the most recent one. Isn’t there a way to backup from another pod as mysqldump allows?

---

<div class="post-metadata">

**Author:** ![svetasmirnova](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/svetasmirnova/32/21_2.png) [@svetasmirnova](https://forums.percona.com/u/svetasmirnova)\
**Post date:** [February 23, 2022, 12:26am UTC](https://forums.percona.com/t/xtrabackup-failed-to-connect-to-mysql-server-ssl-connection-error-unknown-error-number/14533/4 "2022-02-23T00:26:03Z")

</div>

No, there is no such way. XtraBackup performs a physical backup of the database files, therefore needs physical access to the data directory. mysqldump just connects over the network like any other MySQL client, therefore it can backup data from the remote server.

---

<div class="post-metadata">

**Author:** ![Matias\_Insaurralde](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matias_insaurralde/32/5937_2.png) [@Matias\_Insaurralde](https://forums.percona.com/u/Matias_Insaurralde)\
**Post date:** [February 23, 2022, 1:13pm UTC](https://forums.percona.com/t/xtrabackup-failed-to-connect-to-mysql-server-ssl-connection-error-unknown-error-number/14533/5 "2022-02-23T13:13:27Z")

</div>

I was wondering how is it that the scheduled backups work, because when they run, it runs a pod that supposedly executes the backup, how does it work if it is a new pod? Isn’t it supposed to be done from a place that has physical access to the data? how does it get physical access to the data?

---

<div class="post-metadata">

**Author:** ![svetasmirnova](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/svetasmirnova/32/21_2.png) [@svetasmirnova](https://forums.percona.com/u/svetasmirnova)\
**Post date:** [February 25, 2022, 12:52am UTC](https://forums.percona.com/t/xtrabackup-failed-to-connect-to-mysql-server-ssl-connection-error-unknown-error-number/14533/6 "2022-02-25T00:52:43Z")

</div>

K8PXC operator stores data in the persistentVolumeClaim, so the pod can be setup to access it.
