Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to create a HTTP tunnel to PHP to MySQL connection

share|improve this question
why http? most people tunnel through stunnel (encrypted) or ssh. – lepole Jan 18 '11 at 8:35
I'm not very versed in this area. I think that I do not need encryption. I just want to connect to mysql on hosting. Through the standard port 3306 does not work, since it is closed. And I want to connect to mysql through a port 80 through the tunnel. How can I do tell me if you can, I will be grateful. – Zhasulan Berdybekov Jan 18 '11 at 9:35

If you have PHP on the host, you may try using Navicat. (Trial and non-commercial versions are also available.) Take a look to

Once you install Navicat, a php file will be placed among the binaries of the app. Then you have to copy it to your host. When setting up the MySQL server connection in Navicat, go to the HTTP tab, enable HTTP tunneling, and enter the URL of the php put on the host. The IP/port/user/password of your MySql server need to be entered into Navicat as usual. (Set IP as it is seen from the Host on which the php script is running)

It's done.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.