ssh -L 3306:127.0.0.1:3306 yoursshloginid@yourserver.yourdomain.comOnce you supply the password for the ssh session you're in business, the encrypted tunnel is up and running. All you need now is to point Mysql Administrator graphical tool at host 127.0.0.1 (localhost) and port 3306 like the picture below:
The only thing you want to make sure you get right is the 127.0.0.1, DO NOT use localhost. The tools you're using automatically assume a local socket connection to the DB when you use "localhost" as the Server Hostname. Another thing is that all checks that mysql administrator does locally on the server files will not work (ie: the interface will report that the server is down since it can't find mysqld.pid), but all users/schema manipulation works fine since they are network based.If you have mysql daemon installed on your local machine (the machine you initiated ssh from) you need to change the local port to something else other than 3306 and the command will look something like this:
ssh -L 7777:127.0.0.1:3306 yoursshloginid@yourserver.yourdomain.comIn this case I'm using local port 7777 which means I also have to tell mysql administrator to connect through port 7777. You get the idea......








1 comments:
thanks for this tip, really helped!
Post a Comment