Connect to remote MySQL Database Using VB.Net
To connect vb.net to remote MySql database ; No matter what VB.Net version you might be using, just go throw the following steps.
1) Download Mysql Connector/Net from the url (https://dev.mysql.com/downloads/connector/net/)
2) Install the connector; by default the connector will be installed in the path (C:\Program Files\MySQL\Connector Net 6.9.6) that's the version i have installed.
3) Open VB.Net IDE and start the new project.
4) Add the "Mysql.Data.dll" as a reference to your project, which you can find it in the path (C:\Program Files\MySQL\Connector Net 6.9.6\Assemblies\v4.5);
5) Prepare your connection form as shown in this image;

6) Create the class named "Database" and write in the following code.
Database class code
Imports MySql.Data.MySqlClient
Public Class Database
Private _connection As New MySqlConnection
Private _errormessge As String
Private _servername As String
Private _databasename As String
Private _userid As String
Private _password As String
Public WriteOnly Property ServerName() As String
Set(ByVal value As String)
_servername = value
End Set
End Property
Public WriteOnly Property DatabaseName() As String
Set(ByVal value As String)
_databasename = value
End Set
End Property
Public WriteOnly Property UserID() As String
Set(ByVal value As String)
_userid = value
End Set
End Property
Public WriteOnly Property Password() As String
Set(ByVal value As String)
_password = value
End Set
End Property
Public ReadOnly Property ErrorMessage() As String
Get
Return _errormessge
End Get
End Property
Public Function Connection() As Boolean
Try
_connection.ConnectionString = "Server=" & _servername & ";Port=3306;Database=" & _databasename & ";User ID=" & _userid & ";Password=" & _password & ""
_connection.Open()
If _connection.State = ConnectionState.Open Then
_connection.Close()
Return True
End If
Catch ex As Exception
_errormessge = ex.Message
Return False
End Try
End Function
End Class
Form Class Code
Public Class Frm_Main
Private Sub btn_connect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_connect.Click
'Object declaration and instantiation
Dim data As New Database
With data
'Assing the object property values
.ServerName = txt_server.Text
.DatabaseName = txt_database.Text
.UserID = txt_uid.Text
.Password = txt_pwd.Text
'Connection testing
If .Connection Then
MessageBox.Show("Database Conneted.")
Else
MessageBox.Show(.ErrorMessage)
End If
End With
End Sub
Private Sub btn_exit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_exit.Click
Close()
End Sub
End Class
7) Run the project and try the connection; if the connection is successfully then your luck; and if the connection is not successfully with the following error message worry not just keep reading more;

8) Note the ip address on error message after @ (thats your ip) and add it to your domain cpanel "remote mysql access" the image bellow illustrates how the remote mysql access looks like(they are the same bu they may defer in colors); Don't forget to press "add hosts" button. This settings can work daily for those who are in static ip.

See the message of success after the above steps;

But if the error message persists try to leave the password text blank and connect again if you had no password in your remote database; if the error comes again except YES is changed to be NO then you have to check if your in DHCP;
9) If your in DHCP which means the ip is changing in every new Internet connection. If your using modem probably your in DHCP. If your in dynamic ips then check what is changing in the ip's 4 blocks. If the first ip was 197.250.3.201 in the first connection and the next ip is 197.250.60.70 and the next next ip is 197.250.80.24; you have to add 197.250.% in your cpanel access hosts for your connection to be stable.

10) Note: As the percent symbol (wild card) flows to the left side of the ip address the more the door of security becomes open. On new error please contact your domain provider there might be some other security issues in the domain. Thanks!