loading

MariaDB Remote Connection - PuTTY

This article explains how to connect software on a PC to a web hosting account's database via a secure SSH tunnel.

Installation

Download PuTTY

Install and launch it.

Preparation

You will require the web hosting, database and database shell account credentials.

Examples follow.

1

Web server account

hostname: w123.zootzone.net
username: w123
password: ******

2

Database shell account

hostname: w123.zootzone.net
username: dbsh456
password: ******

3

Database account

hostname: 127.0.0.1
username: dbma789
password: ******

Configuration

1

Select Category: 'Session'

Host Name: dbsh456@w123.zootzone.net
Port: 22

Connection type: SSH

Name this session to match your database shell username.

Saved Sessions: dbsh456

2

Select Category: 'Connection -> SSH'

Disable the launching of a remote shell

Protocol options

[x] Don't start a shell or command at all

Preferred SSH protocol version

(o) 2

3

Select Category: 'Connection -> SSH -> Tunnels'

Configure the local side of the connection:

If MariaDB/MySQL is not installed on your PC:

Source port: 3306

If MariaDB/MySQL is installed on your PC:

Source port: 3307

Configure the remote side of the tunnelled connection:

Destination: 127.0.0.1:3306

Select (o) Auto and (o) Local

Click [Add]

Select Category: 'Session'

Click [Save]

Tunnel

1

Initiate the tunnel

Select Category: 'Session'

Select the desired Saved Session

Click [Load]

Click [Open]

You may be prompted to accept the server's host key, the
first time you connect.

Click [Yes]

2

Log in

If you entered all the correct details, you'll be prompted
for the password:

dbsh456@w123.zootzone.net's password:

After typing it in and pressing ENTER:

You will see no further text printed to the terminal.

Leave as is. Do not close the window

Database

1

Launch SQL client

Open the software on your PC which you're going to use to connect to the database.

This would typically be something like MySQL Workbench

2

Connect to database

hostname: 127.0.0.1
port: either 3306 or 3307 (see Configuration Step 2)
username: dbma789
password: ******