But you should still be able to connect through the tunnel with the mysql admin tool. This is probably a security restriction of the tunneling software. You mentioned that you loose the connection to your server when you create the tunnel. Be sure not to run a mysql service on your local box at the same time. Ssh -l remoteusername -L 3306:127.0.0.1:3306 Īfter the ssh or putty connection is active you have to tell your mysql administration software to connect to localhost (so you put 127.0.0.1 or the word localhost as Server Host), because the port is forwarded and now present on your local machine on 127.0.0.1 - this is the result of the port forwarding technik that the ssh protocol can do. If you are using putty go to the ssh tunneling section and add a local port forwarding 127.0.0.1:3306 - and if you are using ssh this is the command: You will have to make a ssh or putty connection from your local machine to the server and forward port 3306 on IP 127.0.0.1 from your server to your local machine. If you don't want to change the setting of the serer you can "forward" the port, which is a different technique and can be done with ssh or putty. You can now see which one is the additional vpn adapter on both machines (they have similar addresses). The procedure you follow to set up an SSH tunnel between your local computer and the A2 Hosting server depends on the local computer's operating system. For more information, please see this article. On the server type "ifconfig" and on the windows machine type "ipconfig" (the spelling idffers in the 2nd character) and the machines tell you the adresses of all their adapters. After you have set up a remote MySQL connection, you can use a MySQL client application to manage your databases. On both your local machine and your server open a terminal window. The 10.10.10.x is only an example, but how do you find out the real address? But the mysql port is probably still not listening on this interface, because it only listens to 127.0.0.1 - you can change this in the mysql server settings, but make sure it won't listen on the public IP. (In this case 10.10.10.1 is the address of the host, which could answer your question). If you ping 10.10.10.1 from your local machine the server should answer. Lets say your server has 10.10.10.1 and your local machine 10.10.10.2 at the ends of the tunnel. Your server and also your local machinne will have additional virtual network adapters in this case. For security reasons the mysql port 3306 is only opened to the local loopback adapter 127.0.0.1 by default.Ī VPN tunnel will create a virtual but secured connection between your local machine and the server. The server also has a public address, which is assigned to the "real" network adapter, lets say 123.123.123.123 - you and the world can reach your server via this adress, but only the ports that are opened to this adapter. Alex, localhost is the name who resolves to the local loopback adapter present on any machine with a connection and it's adress is 127.0.0.1 - so if a client connects to a service on "localhost" this means it connects to a port on the local machine.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |