[Django]-On Django, how to connect to MySQL database on remote server through SSH?

8👍

You can create an ssh tunnel to map the remote server mysql port to a local port on your machine.

ssh -L 3333:127.0.0.1:<remote mysql port> <username>@<remote host> -N

Whiles this process is active the local port 3333 will connect to the remote port on the remote host.

Leave a comment