Skip to main content
Participant
July 13, 2011
Question

I'm having problems with connecting to a remote database

  • July 13, 2011
  • 7 replies
  • 923 views

Hi,

I'm trying to set up a remote connection to a MySQL database. The remote/testing server is all set up ok, but when I come to add a mySQL connection it connects to the site then throws back a "HTTP Error Code 403 Forbidden". My hosting is set up to accept remote connections as long as username/password are correct (which they are!).

There's possibly a problem with the port which should be 3306, but I can't find anywhere to check/change this? Is this what I should be looking for or do I need to try another way of connecting?

This topic has been closed for replies.

7 replies

Community Expert
July 13, 2011
My hosting is set up to accept remote connections as long as username/password are correct (which they are!).

First off that is a very risky setup.  I'm surprised your host would allow it.  The server should only allow connections from specific addresses.

There's possibly a problem with the port which should be 3306, but I can't find anywhere to check/change this? Is this what I should be looking for or do I need to try another way of connecting?

When you enter in the database information, you would need to use the hostname:port if you are using a non-standard port for your SQL server.  DW doesn't explicitly state this but that's the way it's done.  Typically though you really should not work on remote data while working on a local site because any mistakes are made, there is no undo button.  It's recommended that you download a copy of the database for use on your testing server and then connect to the testing server.

Participant
July 14, 2011

Thanks Snakeyez, I've taken your advice and set up the testing server on my machine and copied the database - all working much more smoothly! Thanks!

Lon_Winters
Inspiring
July 14, 2011

Ok, that brings up a question that I've had. I had set up a teasing server locally, but used the remote or live database during development. I did not install a local version of mysql. So when it's time to go live, what is the best process? The local database will have to be replicated on the remote server, and the connection script will have to be changed. Do you still create a connection in DW to the live database?

Lon_Winters
Inspiring
July 13, 2011

Sounds like it's not accepting remote access. Some hosts may require you to manually enable it. Why leads you to believe there's a port issue? If you're on windows, the firewall exception should already be taken care of.