I would like to know which is the best way to reach a MySQL database that is behind a ssh server.
So from DataGrip or DBeaver I need to use a ssh server to be inside the network to reach MySQL endpoint.
Now I’m trying to run Trino locally using Kind/Kubectl and I would like to reach the MySQL server.
How can I instruct K8s to use a similar approach or forward the connectivity using the ssh tunnel I already have for mentioned applications?
Thanks.
3
you can use socat with nohup linux command on your bastion which will redirect your traffic to MySQL server.
nohup socat TCP4-LISTEN:3306,fork TCP4:<your_mysql_server:3306> & cat nohup.out
In trino config, you can put the bastion address:3306. You traffic will reach to the mysql.
1