in reply to Re^2: How do you use Net::OpenSSH to query mysql database via ssh tunnel
in thread How do you use Net::OpenSSH to query mysql database via ssh tunnel
Your database client needs to connect to a local network port (127.0.0.1:12345).
This local network port is forwarded by OpenSSH to a remote network port (127.0.0.1:12345 -> (openssh) -> 127.0.0.1:3306).
The 127.0.0.1:3306 is on the remote server where MySQL runs.
You cannot pass a socket variable in a string to the MySQL client library. You need to pass it as host:post.
In my example, this is 127.0.0.1:12345.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How do you use Net::OpenSSH to query mysql database via ssh tunnel
by nysus (Parson) on May 09, 2017 at 11:28 UTC | |
by Corion (Patriarch) on May 09, 2017 at 13:32 UTC | |
by haukex (Archbishop) on May 09, 2017 at 14:04 UTC |