Use Windows/Mac MySQL GUI over SSH Tunnel
Posted
by Marcin
on Server Fault
See other posts from Server Fault
or by Marcin
Published on 2009-12-14T19:02:26Z
Indexed on
2010/03/23
18:23 UTC
Read the original article
Hit count: 703
I am working on a client's website and he has hosting through 1and1. They don't allow connecting directly to their mySQL server from anywhere. I can't for instance load up a mySQL GUI on windows and just connect and work on the databases, it says host not found. His hosting account on the other hand is given access to the mySQL server even though it is in a different location. Let's say these are the servers I'm working with:
His main hosting:
Address: thehost.com
Username: joe
His mySQL server:
Address: mysqlserver.com
Port: 3306
Database: thedata
User: dbouser
The main hosting account he has comes with SSH. So if I SSH into thehost.com on port 22 and then use the mysql command to connect to mysqlserver.com, it works. I have tried to set up SSH tunneling but the problem is that it's not the mySQL server that has SSH allowed, it's the main hosting. How do I set up SSH Tunneling on both a Mac and a Windows machine so that I can run any GUI I want and I will be able to connect to the mysqlserver.com server. All based on the information above that SSH access is to thehost.com only, and thehost.com itself can connect to mysqlserver.com.
© Server Fault or respective owner