Newbie - database access online
Posted by: monka (---.jplprod.com)
Date: January 02, 2008 06:46AM

HI,

I have successfully set up WampServer and have been able to test locally. I can even make basic php pages available to others online. However, I cant seem to get access to databases when going from a local setup to online. Is this a limitation intentionally placed on the setup or can I change settings somewhere to allow access to databases online?

I am trying to access a database through Flash. I can get it to work locally but not online. Any suggestions would be appreciated.

Thanks

Options: ReplyQuote
Re: Newbie - database access online
Posted by: toivo (203.19.130.---)
Date: January 02, 2008 01:32PM

Hi,

If you are accessing the MySQL database from a web application, it does not matter where the browser client is, the username your application is using for the MySQL connection always accesses the database from the host 'localhost'. Therefore, if the username and password are valid for the host 'localhost', your application should be able to access the database.

However, if you are trying to access the MySQL database using a client application running on your workstation like MySQL Administrator or SQLyog, you need to make sure that the host appearing under the username your application uses to connect is the accurate name of the computer.

In the local LAN the host is likely to be the IP address of your workstation, but if you connect from the internet, the name of the host is the computer name of your workstation followed by the domain name, which is extracted from the ISP's internet connection or your corporate VPN. Even though it is possible to use a wildcard '%' as a host, you may not want to do that for security reasons.

Regards,

toivo
Sydney, Australia

Options: ReplyQuote
Re: Newbie - database access online
Posted by: monka (---.jplprod.com)
Date: January 02, 2008 05:27PM

Thank you very much for the detailed post. I can now get a remote browser to execute a php script to load the contents from a mySQL database. However, trying to access the same database with the same php through Flash does not work remotely. It works locally but there must be some security issues with the Flash Player that I am not addressing. Thank you for getting me this far!!

Options: ReplyQuote


Sorry, only registered users may post in this forum.