CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2016
    Posts
    9

    Lightbulb VB.NET MySQL Application Will Not Connect on Clients Windows 10 64-bit PC...

    Hi,

    I have built an application in VB.NET to connect to a MySQL database to check users registration, but here is the message that they keep getting each time that they try to run the application and check their registration on my website/domain where the MySQL database and server is located:

    "Unable to connect to any of the specified MySQL hosts."


    Here is the VB.NET code that I'm using to connect:

    '
    Code:
    MysqlConn.ConnectionString = "server=198.27.87.232;userid=MyUserID;password=MyPassword;database=aaronest_ekspdb"
    AND I HAVE TRIED:

    Code:
    MysqlConn.ConnectionString = "Server=198.27.87.232;Port=3306;Database=aaronest_ekspdb;Uid=MyUserID;Pwd=MyPassword;"
    But still, my client only see's the following message:
    "Unable to connect to any of the specified MySQL hosts."


    The software will connect and run great on most of my clients computers, but for some reason, every now and then, some clients receive the message above.

    I have also tried to unblock my clients ports on her Windows 10 firewall to no avail.

    Would appreciate the support.

  2. #2
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: VB.NET MySQL Application Will Not Connect on Clients Windows 10 64-bit PC...

    You really should not even be trying to connect directly to your servers database in such a way. You should instead have a service of sorts running on the server. The client programs would talk to that program and that program would talk to the database.
    Always use [code][/code] tags when posting code.

  3. #3
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,824

    Re: VB.NET MySQL Application Will Not Connect on Clients Windows 10 64-bit PC...

    To understand what's happening on the network, you need something like Wireshark which will show the network packets etc etc.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

Tags for this Thread

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured