There's more than one way to do things | |
PerlMonks |
Re^3: How do you use Net::OpenSSH to query mysql database via ssh tunnelby Corion (Patriarch) |
on May 09, 2017 at 11:06 UTC ( [id://1189881]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|