Im trying to connect a vb.net2010 project to a database of a website. I have already added % as host in the remote mysql access of cpanel, and turned off my firewall.
Here is the code I used:
Dim MySQLconn As New MySqlConnection
MySQLconn = New MySqlConnection("server=www.mysite.net; User Id=myusername; pwd=mypassword; database=mydatabase; port=3306;")
Try
MySQLconn.Open()
MsgBox("Sucess", vbOKOnly)
MySQLconn.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
An error is caught which says "Unable to connect to any of the specified MySQL hosts"
I hope I can get help or suggestions.
Thank you.