MYSQL Server Connection

  1. 9 months ago
    Edited 9 months ago

    wamp installed with port 81, here is my code
    But Database was not connected.
    Kindly advice what am missing?

    MYSQL = New MySQLCommunityServer
    Dim n As NetworkInterface
    n = System.GetNetworkInterface
    MYSQL.Host = n.IPAddress
    MYSQL.Port = 81
    MYSQL.UserName = "root"
    MYSQL.Password = "12345"
    MYSQL.DatabaseName = "db_test"

    If MYSQL.Connect Then
    mIsConnected = True
    lbl_MYSQL_Status.Text = "MYSQL DB CONNECTED"
    mIsConnected = False
    End If


    I can open mannually with "localhost:81/phpmyadmin"

  2. Sascha S

    12 Oct 2017 Pre-Release Testers, Xojo Pro Germany/W'haven

    @Pathma M MYSQL.Host = n.IPAddress

    Try to replace MYSQL.Host = n.IPAddress with MYSQL.Host = ""

  3. Tim H

    12 Oct 2017 Pre-Release Testers Portland, OR USA

    MySql makes a distinction between "localhost" and "". They are not the same. Root access is usually limited to "localhost" doesn't work.

  4. Eli O

    is not verified 12 Oct 2017 Europe (Berlin, Germany)

    The port number is probably wrong. If I recall correctly (I am mostly on macOS now) WAMP uses 81 for PHPMyAdmin. The MySQL port is 3306. So this should work:

    db.Database = localhost
    db.Port = 3306

or Sign Up to reply!