Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 15 of 15
  1. #1
    Regular Coder
    Join Date
    Oct 2008
    Posts
    214
    Thanks
    5
    Thanked 22 Times in 22 Posts

    MySQL database host for Win32 application

    Hello!

    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?

    Thanks!

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Are you saying you tried an ODBC connection to a hosting company's MySQL server and were not able to connect?

  • #3
    Regular Coder
    Join Date
    Oct 2008
    Posts
    214
    Thanks
    5
    Thanked 22 Times in 22 Posts
    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).

  • #4
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    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:

    http://helpdesk.hostmonster.com/kb/i...od_id=2&id=280

  • #5
    Regular Coder
    Join Date
    Oct 2008
    Posts
    214
    Thanks
    5
    Thanked 22 Times in 22 Posts
    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.

  • #6
    Senior Coder djm0219's Avatar
    Join Date
    Aug 2003
    Location
    Wake Forest, North Carolina
    Posts
    1,292
    Thanks
    4
    Thanked 202 Times in 199 Posts
    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).
    Dave .... HostMonster for all of your hosting needs

  • #7
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,028
    Thanks
    75
    Thanked 4,325 Times in 4,291 Posts
    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.

  • #8
    Regular Coder
    Join Date
    Oct 2008
    Posts
    214
    Thanks
    5
    Thanked 22 Times in 22 Posts
    Web Service is not a bad idea, but I bet Web hosts don't allow them either?

  • #9
    Super Moderator guelphdad's Avatar
    Join Date
    Mar 2006
    Location
    St. Catharines, Ontario Canada
    Posts
    2,633
    Thanks
    4
    Thanked 148 Times in 139 Posts
    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.

  • #10
    Regular Coder
    Join Date
    Oct 2008
    Posts
    214
    Thanks
    5
    Thanked 22 Times in 22 Posts
    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.

  • #11
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,028
    Thanks
    75
    Thanked 4,325 Times in 4,291 Posts
    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?

  • #12
    Regular Coder
    Join Date
    Oct 2008
    Posts
    214
    Thanks
    5
    Thanked 22 Times in 22 Posts
    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...

  • #13
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,028
    Thanks
    75
    Thanked 4,325 Times in 4,291 Posts
    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!

  • #14
    Regular Coder
    Join Date
    Oct 2008
    Posts
    214
    Thanks
    5
    Thanked 22 Times in 22 Posts
    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...

  • #15
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,028
    Thanks
    75
    Thanked 4,325 Times in 4,291 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •