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”
Else
mIsConnected = False
lbl_MYSQL_Status.Text =“MYSQL DB NOT CONNECTED”
End If
FYI
I can open mannually with “localhost:81/phpmyadmin”
MySql makes a distinction between “localhost” and “127.0.0.1”. They are not the same. Root access is usually limited to 127.0.0.1. “localhost” doesn’t work.
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: