Connecting to MySQL from remote website

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Connecting to MySQL from remote website

Postby GEE_ » 30. November 2009 09:00


With the help of Izzy I got everything locally working with MySQL and the broadcast software.
Now I am having a problem getting our website that is hosted on another server outside the LAN to connect to the server's database.
How the website works is that it pulls the information from the station server, such as, what is playing at the moment, Top 10, if requested, recently played, playlist and requests and a couple of other items for local viewing. The firewall is set to pass the new port set for MySQL and the music request port. These are the only two ports that need to be passed. This was already set up earlier for the server. Everything is the same here except the rebuilt server. Before the new setup I was able to access the database via the work computer on the network, I can not do this anymore.
Mainly, what I need is for the website host to be able to connect to the station database for its constant updates for the page. The last time I set this up was roughly 5 years ago, so I have a bit of a mental block on how we got things to talk to each other.
The below image is to give you an idea how things are setup and the flow of the network.


Last edited by GEE_ on 30. November 2009 09:18, edited 1 time in total.
Posts: 6
Joined: 29. November 2009 01:03

Re: Connecting to MySQL from remote website

Postby Izzy » 30. November 2009 09:05

Well your database user will be tied to the Host localhost.

In phpMyAdmin create a new user for the database and in the Privileges for that user select Any Host instead of localhost.

Use that new user in your database access script from the remote location.

Your other user for localhost can be retained for your local access script.

See if that helps.
Posts: 3344
Joined: 25. April 2006 17:06

Re: Connecting to MySQL from remote website

Postby GEE_ » 30. November 2009 09:40

Thanks again Izzy,

Just needed a kick start here to remember what I had to go through the last time with this. I tried it with Any Host at first and it worked. I changed Any Host out with the IP of the web host and it works fine. Now I think its time here for me to catch some ZZzzz before I fall into the keyboard.. It's 0341 here...

Thanks again for your help.

Posts: 6
Joined: 29. November 2009 01:03

Return to XAMPP for Windows

Who is online

Users browsing this forum: Nobbie and 62 guests