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.
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
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.
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.
The guide ends with a note that the configuration steps for using a jump server to connect to a MySQL database are now complete.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Coder Trainee
Experienced in Java and Python, we share and learn together. For submissions or collaborations, DM us.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
