Re: Mysql Connection
And there is nothing against the rules about providing a PHP-based web API to the database from your hosting account (provided that you have at least one web page that uses the same API, say as a set of AJAX calls). You would still be subject to the same resource restrictions as any ordinary website on your hosting plans, but translating a SQL query/response to and from JSON or a similar, minimal bit of structured text isn't terribly difficult. Binaries would have to be base64-encoded, of course, and you'd want to include some kind of type indication for things that look like numbers (text, floats or exact decimal representations, etc.). The resource cost can be very low, particularly if you use SPROCs -- but having an API with a restricted vocabulary is a whole lot safer than direct DB access in any case. If it's for a desktop app, you can go the whole SOAP route as well.
Just remember that you need a corresponding web UI on your site to make it legitimate according to the terms and policies here. It's a good idea anyway, in case you need to access or manipulate data using a foreign machine.
“Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
"It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)