# How to access MySQL remotely

> Kualo blocks direct external MySQL connections, but you can access MySQL remotely using an SSH tunnel.

Source: https://www.kualo.com/knowledgebase/cpanel-databases/how-to-access-mysql-remotely
Updated: 2026-06-09

---

For PCI compliance and security, Kualo does not allow direct external MySQL connections. To connect remotely, you need to route your connection through an SSH tunnel.

## Two ways to set up an SSH tunnel

- **Built-in SSH tunnelling** - many MySQL clients (such as MySQL Workbench) have SSH tunnel support built in. See our guide on [setting up a secure remote MySQL connection](/knowledgebase/cpanel-how-tos/how-to-setup-a-secure-remote-mysql-connection) for details.
- **PuTTY with port forwarding** - if your client does not have built-in SSH tunnelling, use PuTTY to forward a local port to the remote MySQL port, as described below.

## Port forwarding with PuTTY

### Step 1 - configure the tunnel

1. Open PuTTY.
2. In the **Category** pane on the left, expand **Connection**, expand **SSH**, then click **Tunnels**.

![PuTTY Tunnels panel](https://kb-cdn.kualo.com/ea/ff/eafff71f0623b9a3260b739e8d605ecb371dbd8f.png)

### Step 2 - add the port forwarding rule

1. In the **Source port** field, type `3306`. This is the local port that will be forwarded.
2. In the **Destination** field, type `localhost:3306`.
3. Confirm that the **Local** and **Auto** radio buttons are selected.
4. Click **Add**.

![PuTTY port forwarding settings](https://kb-cdn.kualo.com/aa/c0/aac08ea94b51a8c063564442c5e64105d9a63870.png)

### Step 3 - open the SSH session

1. In the **Category** pane, click **Session**.
2. In the **Host Name (or IP address)** field, enter your domain name or server IP address.
3. In the **Port** field, enter the SSH port for your account.
4. Confirm that the **Connection type** is set to **SSH**.

![PuTTY Session panel](https://kb-cdn.kualo.com/d3/5c/d35c484a5aae30d3927a3060c69e2fcd522610ea.png)

5. Click **Open**.
6. If a PuTTY security alert about the server host key appears, click **Yes** to accept it.

![PuTTY security alert](https://kb-cdn.kualo.com/87/45/874598a73b3327e39fc95329b7892682361265d4.png)

7. When prompted, enter your cPanel username and password.

![PuTTY login prompt](https://kb-cdn.kualo.com/a9/45/a94550500b2c7e7c3d0981ffb55f7575c0eba92a.png)

Once the command prompt appears, the SSH tunnel is active. Your MySQL client can now connect to `127.0.0.1` on port `3306` as if MySQL were running locally.

:::info
If SSH is not yet enabled on your account, please [contact us](https://www.kualo.com/company/contact) via live chat or a support ticket and we will enable it for you.
:::

---

_Source: Kualo Knowledgebase — https://www.kualo.com/knowledgebase/cpanel-databases/how-to-access-mysql-remotely · © Kualo Ltd._
