# MySQL and SSH Tunnel

**URL:** <https://community.n8n.io/t/mysql-and-ssh-tunnel/144216>\
**Category:** Questions\
**Tags:** mysql\
**Created:** [July 5, 2025, 11:19am UTC](https://community.n8n.io/t/mysql-and-ssh-tunnel/144216 "2025-07-05T11:19:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![A\_Cevallos](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/a_cevallos/32/97246_2.png) [@A\_Cevallos](https://community.n8n.io/u/A_Cevallos)\
**Post date:** [July 5, 2025, 11:19am UTC](https://community.n8n.io/t/mysql-and-ssh-tunnel/144216/1 "2025-07-05T11:19:09Z")

</div>

## Describe the problem/error/question

I’m trying to use the MySQL node with the SSH tunnel option and a private key.

## What is the error message (if any)?

When I hit save, it loads indefinitely.

When i try to create the same conection using SSH node it’s work fine.

I tested the credentials with MySQL Workbench and they work fine.

## Information on your n8n setup

# Debug info

## core

- n8nVersion: 1.95.3
- platform: docker (self-hosted)
- nodeJsVersion: 20.19.2
- database: postgres
- executionMode: scaling (single-main)
- concurrency: -1
- license: enterprise (production)

## storage

- success: all
- error: all
- progress: false
- manual: true
- binaryMode: memory

## pruning

- enabled: true
- maxAge: 336 hours
- maxCount: 10000 executions

---

<div class="post-metadata">

**Author:** ![mrrobot](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mrrobot/32/91220_2.png) [@mrrobot](https://community.n8n.io/u/mrrobot)\
**Post date:** [July 6, 2025, 12:04pm UTC](https://community.n8n.io/t/mysql-and-ssh-tunnel/144216/2 "2025-07-06T12:04:19Z")

</div>

Hey @A_Cevallos,

I tried the same it did load indefinitely.  
Just close it and try a “Select” Operation it worked for me.

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/1/1/11997a46aa62272ad2f2377e3026e7d0afc7f6b5.png)

---

<div class="post-metadata">

**Author:** ![A\_Cevallos](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/a_cevallos/32/97246_2.png) [@A\_Cevallos](https://community.n8n.io/u/A_Cevallos)\
**Post date:** [July 6, 2025, 12:40pm UTC](https://community.n8n.io/t/mysql-and-ssh-tunnel/144216/3 "2025-07-06T12:40:24Z")

</div>

Hi @mrrobot thanks for your answer.

I can not reach that screen because my error happens when creating the connection. It keeps in testing, http response is 500 and nodes logs complain about connection error. The exactly same ssh credentials works fine as normal ssh credentials.

---

<div class="post-metadata">

**Author:** ![mrrobot](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mrrobot/32/91220_2.png) [@mrrobot](https://community.n8n.io/u/mrrobot)\
**Post date:** [July 6, 2025, 12:44pm UTC](https://community.n8n.io/t/mysql-and-ssh-tunnel/144216/4 "2025-07-06T12:44:32Z")

</div>

hey @A_Cevallos ,

i have mysql running as container and n8n as well.

```auto
host : machine_ip
Database: db_name
User : mysql_user
Password : <>
Port : 3306
Connect Timeout : 10000

SSL : off
SSH Tunnel : on

SSH Authenticate with : Password
SSH Host : machine_ip
SSH Port : 22 (or custom port)
SSH Passowrd : <>

```

What is your setup mysql is on another machine ?

---

<div class="post-metadata">

**Author:** ![A\_Cevallos](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/a_cevallos/32/97246_2.png) [@A\_Cevallos](https://community.n8n.io/u/A_Cevallos)\
**Post date:** [July 6, 2025, 9:01pm UTC](https://community.n8n.io/t/mysql-and-ssh-tunnel/144216/5 "2025-07-06T21:01:36Z")

</div>

oh, yes, the mysql instance is out of n8n docker and so, in other server… but I can connect to that mysql with ssh tunneling in workbench or other db managers…

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [October 4, 2025, 9:01pm UTC](https://community.n8n.io/t/mysql-and-ssh-tunnel/144216/6 "2025-10-04T21:01:41Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
