Connecting using HTTP Tunneling

This option saves your day if your ISP/MySQL provider disallows remote access, either by blocking the MySQL port or by giving access to “localhost” only. The response is slow compared to the direct connection or SSH Tunneling method as the data is XML encoded and HTTP is stateless by nature. However, you can use all the cool features of SQLyog.

To use this method,  just upload SQLyogTunnel.php to your webserverSQLyogTunnel.php is available in the SQLyog installation folder. SQLyogTunnel.php exposes the MySQL API as a set of web-services which is used by SQLyog.

Select the  HTTP tab, check Use HTTP Tunneling option and provide the URL of the tunneling page. Just make sure that the MySQL Host Address you provide in Server tab is accessible from the Tunneling URL.

Ex. Your webserver and MySQL is hosted on 234.56.45.21, and then you need to specify localhost in the MySQL Host Address field of Server tab instead of 234.56.45.21.

If you access internet over a proxy server or the SQLyogTunnel.php is hosted in a password protected server then you can provide the required authentication details by clicking on the  Advanced button.

The content-type option was added in 6.5. Most users will not not need to care about this as they most often will all work, but in some situations a special HTTP format is required. Known situations are:

  • With Apache and mod_security extension enabled in Apache configuration it may be necessary to use 'urlencode'
  • With IIS running on Windows Server 2003 some PHP editions will fail to connect with 'urlencode' setting.
  • Open source webservers (like Apache, Lightttpd) may have been built with some code change (or 'hack') blocking certain HTML content-types.

Also added an option to use Base64 encoding for communicating XML data stream with the HTTP tunneler.

Note that you may rename the tunneler file to any filename and extension that the webserver/PHP configuration accepts as a valid PHP file. Though the risk that the tunneler can be misused is very low (as it will only work with SQLyog and SJA and not from a browser, command line or any other client) it is theoretically possible for anybody having SQLyog or SJA to attempt to connect to your database.  Also a 'brute attack' (attempt to crack password or just creating a denial-of-service situation) is (depending on configurations on the server) theoretically possible with an application calling SJA recursively with different authentication parameters.

Connecting using HTTPS Tunneling

Upload the Tunneler to your web server supporting HTTPs. In the URL field, provide the correct HTTPs URL.

NOTE: This feature is available in SQLyog Professional, Enterprise and Ultimate.

Uploading SQLyogTunnel.php

This tutorial takes you through the steps for uploading  SQLyogTunnel.php to your webserver.

First of all you need a FTP client to connect to your webserver. We are going to use CuteFTP 4.2 in this tutorial. You can use any FTP client you are comfortable with. Most ISP also have some FTP transfer option integrated in the Control panel application that every user has access to

After starting up your chose FTP client, you need to define your website i.e. give the details of your web server.

What comes next can look somewhat different with different FTP clients. But the basic information and options will be available in some form. In CuteFTP you will get a window with two panes on successful connection. Left hand window will show the contents of your local directory and right hand the remote directory.

Follow the given steps to upload SQLyogTunnel.php:

  • Change the local directory to the installation directory of SQLyog.
  • Change the remote directory to one where you want to upload the PHP file e.g. tunnel. You can create a new directory by right-clicking and selecting Make New Directory... from the popup menu.
  • Drag SQLyogTunnel.php from the left window to the right window.