View Full Version : MySQL database host for Win32 application

03-17-2009, 04:53 PM

I'm looking for a good hosting solution that will allow me to connect to their MySQL remotely.

Usually with PHP, you connect to your MySQL database using "localhost" every connection attempt from external sources are blocked. (You can't use tools like www.heidisql.com either)

I want to be able to connect to MySQL from a Win32 application I'm developing.

Anyone have host suggestions?


03-17-2009, 05:11 PM
Are you saying you tried an ODBC connection to a hosting company's MySQL server and were not able to connect?

03-17-2009, 05:37 PM
Yes (used ADO connections), both hosts I use don't allow connections to their MySQL database from the outer world (I can only connect to MySQL through PHP).

03-17-2009, 07:25 PM
I just check my host's help system and it appears to be possible to enable remote access. I use Hostmonster. Here's the article that explains the process at Hostmonster:


03-17-2009, 08:49 PM
They seems to allow it but only your current IP address can be allowed :

*Note: You can only add the ip address of the machine that you logged into the control panel with(security precaution).

Not very useful if I want to distribute my software... I would prefer to allow everyone by default instead of blocking everyone.

03-17-2009, 09:30 PM
It's usually blocked to prevent attacks and opening it up to the world would be a very bad idea IMO. Hosts that allow remote connections at all are fairly rare (for good reason).

Old Pedant
03-18-2009, 02:13 AM
It's a crappy idea to use a direct connection, anyway.

Create a Web Service on the server that has some pretty strict authentication and then connect from your apps to that web service.

Now you can easily strictly limit exactly what queries are allowed when and by whom.

Since you will have to be pushing the data across a pretty long wire in either case, the small extra overhead of the web service won't be noticeable, I'd bet.

p.s.: I do *NOT* necessarily mean you need to use a SOAP or other XML web service, though it wouldn't be a bad idea. You can invent your own protocol, if you prefer.

03-18-2009, 02:46 PM
Web Service is not a bad idea, but I bet Web hosts don't allow them either?

03-18-2009, 02:57 PM
I'd say you get what you pay for. If you are looking to develop software and distribute it to users, find a host that easily allows you to do what you need.

03-18-2009, 04:20 PM
guelphdad : It's exactly what I'm asking... I want to know if someone here know a good host who allow this. All the good ones that I know don't allow this.

Old Pedant
03-19-2009, 01:19 AM
Web Service is not a bad idea, but I bet Web hosts don't allow them either?

Ummm...can you tell me how a web host even *KNOWS* that you are supporting a Web Service???

Granted, if you need to have WSDL "discoverability" I could see a host not allowing that (dunno why they would care, but yes, they could block it).

But if YOUR SOFTWARE is controlling both "ends", a so-called web service looks NO DIFFERENT to the server than any other HTTP request! Honest. It doesn't use a special port number, it doesn't use a special form of URL, it uses standard HTTP protocol (one REQUEST, one RESPONSE). That's *exactly* why web services are so popular!

Want me to put up a web servuce on my $6 a month GoDaddy account to prove it?

03-19-2009, 04:34 PM
Nah, I trust you, it's just that I don't know much about Web services... I tought they were like Windows services (a process that "always" run when the machine is ON).

I guess I'll search for a tutorial...

But I would prefer direct access since my software will be freeware and will work either locally (local "flat file" database) or online. If the user want to use it online it must setup a server and provide credentials to my software.

My software use DAC (direct access component) to connect to MySQL. I guess if I use a Web service, I will have to mostly rewrite the data exchange code...

Old Pedant
03-19-2009, 11:37 PM
It shouldn't be too hard to isolate the actual data queries so that they work either way. Heck, you *could* write the code that access the web service so that it returns an in-memory representation of the "flat file" that's identical to what it looks like from the local machine.

Do you REALLY mean "flat file"??? As in something like a ".csv"? As opposed to an ".mdb" Access file? Does that imply that it is READ-ONLY?? If so, emulating via the web service would be trivial!

03-20-2009, 03:26 PM
Don't fear, my local database is not a plain flat file (like CSV or so)... It's a file based relational database system and bsed on SQL'92...

Old Pedant
03-21-2009, 07:19 AM
All the more reason that you should be able to emulate it effectively via the web service, since you know all about how it works, presumably.