Contents
Introduction
This is a step-by-step walkthrough for using SSH tunnelling to gain access to your databases remotely.
You will need your SFTP login details for this, which can be managed according to our guide here.
Using command line
STEP 1
Open your SSH client
Once you have your login credentials you will need to use a terminal application such as Command Prompt for Windows or Terminal for Mac.
To find Command Prompt on your Windows computer, press Windows key + r
then type in cmd
and hit ok which will launch the application, or search terminal in the Finder Utility on a Mac.

STEP 3
Login to the database
From here you can use two commands, if you know the login information for your database you can use a mysql command mysql -u YourUsername -p DatabaseName
and input the database password when prompted, or if it’s a WordPress website, step into httpdocs using cd httpdocs
and run wp db cli
STEP 4
Run your commands
From here you can use any mysql commands such as show tables;
to view all the tables in the database, when done you can type quit to exit the mysql command line.
Using an application
STEP 1
Download your database application
Download your database application (if not already downloaded) for example, we will be using: https://dbeaver.io/download/

STEP 2
Create a connection
Once installed and setup, open the application and on the Database navigator section right click > Create > Connection

STEP 3
Select MySQL.
From the list of available databases, select the ‘MySQL’ option.

STEP 4
Enter your database connection information
On the net page you can fill in your database access details.
Set the server host to 127.0.0.1
Once filled in click on the SSH tab and tick ‘Use SSH tunnel’
You can now fill in additional information, this will be for your SFTP user login, set either your domain name or the hosting IP address as the Host, have authenticate method on password then enter in the username and password, do make sure the SFTP lock is unlocked if applicable via the control panel https://account.34sp.com

STEP 4
Test your connection.
When your details are filled in, you can use the test connection to make sure it can connect, if so save the details and in the same panel you should now see the database name, click on that and it will connect to the hosting server and open the database.
