how to connect remote MySQL through ssh tunneling
# troubleshooting
b
how to connect remote MySQL through ssh tunneling
b
Hi there, Do you have all the credentials for your tunnelled connection? Have you used another tool to connect to this MySQL database already?
@orange-car-25613 Managed to tunnel in when using a Postgres Redshift database. It should be pretty similar as the credential fields are similar! This thread may help
You may need to use
ssl
=
no-verify
g
This PR adds SSH tunnel support for MySQL - at the time, we hadn't tested it so it was closed, but it may be worth looking at if you need that feature
b
{
"credentials": {
"connectionString": "",
"database": "<database name>",
"host": "<database server address>",
"port": "<database server port>",
"user": "<database user>",
"password": "<database user password>",
"tunnel": "ssh",
"ssh": {
"host": "<ssh server>",
"port": "<ssh port>",
"user": "<ssh user>",
"privateKeyPath": "<USERPATH>/.ssh/id_rsa"
}
},
"database": "mysql"
}
but error message is "***_db_connect connect ETIMEDOUT"
✗ ***_db_connect Missing database credentials
b
Hi @brainy-raincoat-5393 , After doing a bit of research, I think our mysql connector currently does not support SSH. We use this file to execute queries with mysql. We do not currently pass these variables you are trying to use to the SQL connection:
Copy code
"tunnel": "ssh", 
"ssh": {
            "host": "<ssh server>", 
            "port": "<ssh port>", 
            "user": "<ssh user>",
            "privateKeyPath": "<USERPATH>/.ssh/id_rsa"
        }
which is why it is failing I believe. I am unclear on the syntax we'd need to support this with our db connector, which uses mysql2. We'd happily review a Pull Request to add this feature!
b
🤩💕🥰