Create a SSH Tunnel in Private Network to get access in remote database for WordPress
I’ve a droplet (D1) running in SanFransisco 01 datacenter. This is my Apache2 web server running a WordPress site. I’ve created a new Droplet (D2) in SanFransisco 01 datacenter. This one is for MySQL Database. Both has Private Network enabled.
I’ve created a SSH Tunnel in D1 to access database of D2
ssh -fNg -L 3307:127.0.0.1:3306 root@D2_PUBLIC_IP_ADDRESS
But I am getting high latency and want to improve it through connecting it via private network. How can I achieve it?
I’ve tried to ssh to Private IP
but I get this error
connect to host D2_PRIVATE_IP port 22: No route to host
How can I achieve this to minimize latency?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×