Databases 3 min read

Connecting MySQL via a Jump Server When Direct External Access Is Blocked

This guide explains how to configure a MySQL client to connect through a bastion host using an SSH tunnel, covering both the standard local connection settings and the jump‑server parameters needed when direct external access is prohibited.

Coder Trainee
Coder Trainee
Coder Trainee
Connecting MySQL via a Jump Server When Direct External Access Is Blocked

Problem

A teammate asked to open MySQL access, but despite having the username, password, and SSH details shared in the work group, the connection still failed with error 1045, indicating insufficient permissions for remote access.

Configure a Regular Local Connection

First, set up the usual MySQL connection parameters that are commonly used:

Host: 127.0.0.1 (local address)

Port: 3306 (adjust if your MySQL instance uses a different port)

Username: the normal database user name

Password: the corresponding password for that user

Configuration screenshot
Configuration screenshot

Configure the Jump Server (Bastion Host)

Next, set up an SSH tunnel through a jump server to reach the MySQL instance:

Enable the SSH channel option.

Host: enter the external IP address or domain name of the jump server.

Port: keep 22 (default SSH port).

Username: the remote user that has SSH access to the jump server.

Password: the password associated with that SSH user.

Jump server configuration screenshot
Jump server configuration screenshot

Test the Connection

After completing both configurations, click the test connection button. A successful connection will display a screenshot confirming that the MySQL link is established.

Successful connection screenshot
Successful connection screenshot

The guide ends with a note that the configuration steps for using a jump server to connect to a MySQL database are now complete.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

MySQLJump ServerSSH TunnelDatabase ConnectionBastion Host
Coder Trainee
Written by

Coder Trainee

Experienced in Java and Python, we share and learn together. For submissions or collaborations, DM us.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.