By default, port 3306 is closed to the outside world on all servers at MageMojo. This can be opened if needed, but if you want to use a local MySQL manager or other application, an SSH tunnel is preferred where possible. SSH tunnels are possible with a variety of clients but in this example, we will be using putty.
Before you can connect, you need several pieces of information:
- A working SSH login to your MageMojo server
- The IP you will be connecting to MySQL from (this should be the same IP you whitelisted for SSH access)
If you have the above, you can proceed.
- Open PuTTy; you should see a screen like this:
- Enter your MageMojo.com servername in the hostname field.
- From the left-hand tree, go to Connection->SSH->Tunnels
- Set the source port to 3306 (this is the port on the server you want to use to get to MySQL) and the destination to 127.0.0.1:3306. This is the local port your local computer or application will use to connect to the MySQL server at MageMojo.
- Connect to the server by pressing the Open button. Accept the SSH key if needed.
- Your tunnel is now open, connect locally using your MySQL client to 127.0.0.1 on port 3306. In the screenshot below MobaXterm was used to connect on the default port with a user named test_user and we can see the database via the MySQL CLI