I recently wrote a small PHP script to get users that are online in my application, which uses MySQL and is hosted from my dedicated server. I use a popular web hosting company and had trouble connecting to my MySQL database from the script, so I contacted the web host and I was told this:
Sorry. We are unable to allow connections to external databases as it is a security risk.
The support representative was apparently unable to tell me what this 'security risk' is, and I can't think of any additional security risks accessing external database systems would bring as this particular host allows connections to the databases situated on their hosting platform.
I suspect that this could be a marketing tactic (that you must use their database servers), but is there any actual risk of accessing a remote database server?