You should see the ssh command you entered earlier in this list of processes. To verify that the SSH tunnel was started successfully, run the following command: ps aux | grep ssh
If you are using a password to connect to the remote server, you'll want to remove this argument. Useful for having the SSH tunnel run in the background. -f Requests ssh to go to background just before command execution.This is where the magic happens: ssh -fNL 3307:localhost:3306 REMOTE_HOST with the IP address (or host name) of the remote server. We will be using SSH to set up a connection to our remote host, through which all requests to a specific port locally will be forwarded to a specific port on the remote machine. This will allow you to run the SSH tunnel as a background process.
It is not absolutely necessary, but I suggest setting up Passwordless SSH between your local machine and the remote server. If you need help with that, there are plenty of articles floating around to guide you. This tutorial assumes you've already got phpMyAdmin up and running locally.
I am going to show you how to manage any number of remote MySQL databases from your local instance of phpMyAdmin without compromising on security.
Have you ever needed to manage your remote MySQL databases, and ended up settling on the less-than-ideal setup of having an instance of phpMyAdmin on the same server as the MySQL server? Well, I am about to make your day.