Connecting to MySQL Remotely for GoDaddy Web Hosting Users

The GoDaddy web hosting service has an option to disable remote access to MySQL databases for security reasons. RazorSQL provides a MySQL PHP bridge so that users can connect to their GoDaddy MySQL databases from a remote machine, even if remote access is disabled. If your GoDaddy MySQL database is set up to allow direct connections (i.e., remote access is enabled), you should be able to use RazorSQL to connect directly to the database. If direct connection is not set up, you will need to use the PHP bridge.

Listed below are GoDaddy specific tips to getting connected to MySQL with RazorSQL. The following link contains general information on how the PHP bridge works, how to deploy the bridge PHP page, etc.

MySQL PHP Bridge Guide

The following zip archive contains all of the RazorSQL ASP and PHP bridge pages. The file that needs uploaded to your site for MySQL is the razorsql_mysql_bridge.php file.

RazorSQL Bridge Pages

The following settings are typical values needed to connect via the bridge for GoDaddy users:

Bridge URL: This is the URL of the razorsql_mysql_bridge.php page that you deployed either via FTPing the file to your site, or by using your GoDaddy Hosting Control Center to upload the php page. For example, if your domain name is www.acme.com, and you uploaded the bridge to the db subdirectory on acme.com, the URL would be the following:

https://www.acme.com/db/razorsql_mysql_bridge.php

Host or IP Address: This is the GoDaddy mysql host. This information should be available from GoDaddy in your hosting control panel. GoDaddy servers typically have the [servername].secureserver.net name or the [servername].hostedresource.com or something similar.

You can find the MySQL server name by going to the databases section of the Hosting Control Center, and then clicking the edit button next to the MySQL database. This will display the host name, database name, database version, etc.

Port: The port would generally be the default port of 3306. This can be left blank unless the port is not 3306.

Database Name: If you have already created a MySQL database on your GoDaddy site, enter it here. GoDaddy would typically create the database name to be the same as the user name for the database.

Listed below are more detailed instructions for setting up the RazorSQL PHP bridge with Godaddy.

1. If you do not already have the razorsql_mysql_bridge.php file uploaded to your Godaddy site, first obtain the razorsql_mysql_bridge.php file and/or razorsql_mysqli_bridge.php file. On Windows, these files are located under the RazorSQL installation directory in the "bridge" folder.
To obtain the bridge files on the Mac, right-click or hold control and click if you don't have a right-click button on the RazorSQL.app icon. Select the "Show Package Contents" option.
Navigate to the Contents/Java/bridge folder.
Copy the razorsql_mysql_bridge.php file and the razorsql_mysqli_bridge.php (this may be needed for newer versions of PHP) file to an easily accessible location on your computer like your Desktop
2. Upload both php files to your Godaddy site. You can use the File Manager in the Godaddy control panel to upload files.
NOTE: The default password for the RazorSQL bridge is radmin. If you want to change this, edit the PHP file searching for radmin and change it to something else.
3. Determine your Godaddy MySQL database host name and database name.
To do this, go to the Godaddy control panel and click on the Databases -> MySQL menu.
Click on the name of the database.
This will bring up a new window. On the new window will be a Hostname field. This is a value you need to enter later in RazorSQL.
This page should also display a field named "Database Name and User Name". You will also need to enter this value in RazorSQL.
4. Launch RazorSQL and then do the following:
Select the Connections -> Add Connection Profile menu option
Select MySQL as the Database type and click Continue
Under the Connection Type list, select the RazorSQL MySQL Bridge menu option
In the Bridge URL field, enter the URL of the razorsql_mysql_bridge.php location. For example, if your Godaddy website host name is https://www.acme.com, and you uploaded the razorsql bridge to a bridge sub-directory via your Godaddy file manager, the URL would be the following:
https://www.acme.com/bridge/razorsql_mysql_bridge.php
In the Bridge password field, enter radmin or if you changed the bridge password in the php file, enter what you changed it to.
In the Login field, enter your mysql user name. For Godaddy, this is generally the same as the database name.
In the Password field, enter the password for your MySQL database
In the Host or IP Address field, copy and paste the value from the Godaddy control panel from step 3 for the Hostname field. Make sure there are no extra spaces on the end.
In the Database Name field, copy and paste the value from the Database Name or User Name field from step 3.
In the Port field, enter 3306
Click Connect.
You should now be able to connect to your MySQL database via the RazorSQL PHP bridge.
NOTE: If you do not have support for older versions of PHP enabled, use the razorsql_mysqli_bridge.php file instead of the razorsql_mysql_bridge.php file.