RazorSQL MySQL Bridge User's Guide
  

The RazorSQL MySQL Bridge provides the ability for users to interact with a MySQL database without making a direct connection to the database. Instead, the user connects to the RazorSQL MySQL Bridge, which then connects to the database. The RazorSQL MySQL Bridge is a PHP program that can be deployed on any web server that supports PHP and has the necessary PHP MySQL libraries installed.

Many times, web hosting providers include MySQL as part of their hosting packages, but do not allow users to connect to the MySQL database from a remote location. This forces users to use a web based application to access their MySQL database instance, or resort to complex solutions such as SSH tunneling. The RazorSQL MySQL Bridge allows users to connect to a MySQL database with the simple deployment of a PHP page.

Requirements

The RazorSQL MySQL Bridge requires a web server with PHP support and the MySQL PHP libraries must be installed and configured.

Deployment

The RazorSQL MySQL Bridge file is located here:

<RazorSQL Install Directory>/bridge/razorsql_mysql_bridge.php

To deploy the bridge, simply copy this file to a PHP enabled web server.

Also included is a test page to check to see if MySQL can be accessed via the web server. The test page is located here:

<RazorSQL Install Directory>/bridge/test_mysql_setup.php

To test the MySQL setup, simply copy this file to a PHP enabled web server, access the page, and follow the instructions.

Security

The RazorSQL MySQL Bridge can work via either HTTP or HTTPS. If retrieving sensitive data, it is recommended that HTTPS be used.

The RazorSQL MySQL Bridge provides the ability to supply a bridge password. Only calls to the brige that include a correct password will be handled. The bridge ships with a default password of radmin. It is recommended that this password be changed. To change the password, simply replace the radmin in the following line of the bridge PHP page with another password.

$checkPassword = 'radmin';

Accessing the Bridge

Once the bridge PHP page is deployed to a web server, the bridge can be called via either HTTP or HTTPS. When adding a connection profile that will communicate via the RazorSQL MySQL Bridge, there is a field available called the Bridge URL. Simply provide the URL for the deployed bridge PHP page here.

Since the bridge does not hold on to connections, but instead opens and closes connections for each call, the bridge cannot do multiple fetches to the database for the same query. Because of this, there is a field call "max rows to return" located in the add connection profile screen when setting up the bridge. The value of this field tells the bridge the maximum number of rows to fetch per query. If set too high, this could cause performance problems.

Limitations

There are certain features of RazorSQL that are not available when using the RazorSQL MySQL bridge. The Execute Procedure/Function tool is not available. Also, all connections via the bridge are set to auto commit since connections are not held onto by the bridge.