NOTE: Symbols won’t appear in the terminal when you type in the password. You will now be prompted to enter in your cPanel username and password found in your SSH connection details. When you connect to the server for the first time, a security alert will appear. Simply select the saved preset from the list, click Load and Open to use it.Ħ. NOTE: Since you’ve already saved your session settings, you can skip steps 1-4 next time you wish to open an SSH tunnel. Now click on Open to establish a connection to the server. Now choose a name for this preset and type it in in the Saved Sessions field. Go to the Session tab and fill in the Host Name and Port using the server hostname and port from your SSH connection details. Once you’ve done this, you should see the tunnel in the field above:Ĥ. Make sure that the ' Local' mode is checked and then click Add: ![]() Go to the Connection > SSH > Tunnels section and fill in the values mentioned in Tunnel details as follows: Go to the Connection tab of the ' Data' section and make sure that the Auto-login username field is empty (you can also fill in your cPanel username there), and the ' Prompt' option is checked:ģ. Your database name, user, and password should match corresponding values from Server-side MySQL details.Ĭonnect with Terminal (for Linux and MacOS)Ģ. Your server hostname and port should match Local IP and Port from the Tunnel details. These are the access details you will use at the end of the app or website you are trying to connect to the database remotely. Your remote IP address and port should match the server hostname and port from Server-side MySQL details and cannot be changed. Since some of our customers are running local MySQL servers on the 3306 port, let’s use the 5522 port in this example to ensure that the Local Port is not used by any service. Your local IP address and port may be changed, according to your preference. If you are not familiar with this menu, feel free to check this article. Your database name, user, and password are what you’ve specified while creating the database in the MySQL Databases menu. Your server hostname and port will be the same for all Shared Hosting servers. The port will be the same for all Shared Hosting servers. ![]() Your cPanel username and password are what you use to log in to your cPanel account. You can check it in your Welcome Email for your hosting plan. Your server hostname will be different for your account. ![]() Here is a list of details you will need in the process: Feel free to follow this guide to check the settings. NOTE: Make sure that the SSH access is enabled for your account. ![]() NOTE: If you are trying to connect to PostgreSQL databases, use port 5432 instead of 3306.īelow you can find the steps on how to configure a third-party SSH client (PuTTY) and MacOS and Linux built-in one (Terminal). Now you can effectively connect to the remote server's MySQL database as if it were running on your local box. However, you can easily set up an SSH tunnel between your computer and our server using an SSH client with the MySQL port 3306 forwarding.Īfter doing this, you will have port 5522 on your local machine that listens to and forwards to your remote server's localhost on port 3306. How to remotely connect to a MySQL database located on our shared server Due to security reasons, remote MySQL connection is disabled on our Shared Hosting servers.
0 Comments
Leave a Reply. |