gortron Posted June 23, 2008 Share Posted June 23, 2008 PHP can often connect to a remote mySQL databases, but it depends on the hosting provider. Some allow it, some require a pinhole to be created in the firewall and some don't allow any remote connections to their database. Is there any way using items such as PEAR or SOAP to allow PHP to connect to a remote mySQL database that might be blocked in this way? Quote Link to comment https://forums.phpfreaks.com/topic/111476-connecting-to-a-mysql-database-behind-a-firewall/ Share on other sites More sharing options...
dbo Posted June 23, 2008 Share Posted June 23, 2008 I believe the answer is no. Regardless if some abstraction layer is used, the database is still accessed via the same port. As such, you'll have to open up the said port to allow outbound connections. While this can be done at the firewall level it's usually a good idea to only grant database permissions at the ip or domain name level when possible. You naturally want to restrict as much access as possible. Just as another good measure if the user is only reading (selecting) records it's best to not give them the ability to update/add/delete records as well. Quote Link to comment https://forums.phpfreaks.com/topic/111476-connecting-to-a-mysql-database-behind-a-firewall/#findComment-572153 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.