Create SSH to mysql socket?
Posted: Thu Nov 20, 2025 4:08 pm
Is it possible to automate this with the program RoboTask? Specifically, to create a ssh connection to mysql socket and, if the connection drops, automatically re‑establish it.
See my acutally the CMD command: The CMD command establishes an SSH tunnel that forwards your local port 5001 to the MySQL socket file /var/lib/mysql/mysql.sock on the remote server 123.123.123.123. This allows you to connect locally to port 5001 and transparently access the MySQL database on the remote host, even though it normally only accepts local socket connections.
thx
See my acutally the CMD command: The CMD command establishes an SSH tunnel that forwards your local port 5001 to the MySQL socket file /var/lib/mysql/mysql.sock on the remote server 123.123.123.123. This allows you to connect locally to port 5001 and transparently access the MySQL database on the remote host, even though it normally only accepts local socket connections.
Code: Select all
ssh -N -L 5001:/var/lib/mysql/mysql.sock USER@123.123.123.123