Hello, I am having trouble connecting to my database, but I have also noticed that all the examples in the documentation point to localhost. I need to be able to connect to a remote database over ssh.
I think I have done everything else correctly. I see that there is a place to input a user name and password, but these are the mysql credentials. I don't see where to put in my ssh credentials. Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If the server is not on your local network you can create a tunnel to a remote server over SSH which makes the remote database server appear as though it was running on your localhost:
Hello, I am having trouble connecting to my database, but I have also noticed that all the examples in the documentation point to localhost. I need to be able to connect to a remote database over ssh.
I think I have done everything else correctly. I see that there is a place to input a user name and password, but these are the mysql credentials. I don't see where to put in my ssh credentials. Thanks.
If the server is not on your local network you can create a tunnel to a remote server over SSH which makes the remote database server appear as though it was running on your localhost:
ssh username@remotehostname -L port:remotehostname:port -N
where "port" is the TCP port, eg for MySQL that would be 3306:
ssh 3x5@www.myserver.com -L 3306:www.myserver.com:3306 -N