having trouble connecting to mysql database from VB
Hello Friends,
I'm trying to connect to mysql database from vb, my computer is a localhost on which i have mysql and php.
After several tries i dicided to come here and ask for help.
when i start debugging this is the message that pops up (see the attachments to see the image)

I'm trying to connect to mysql database from vb, my computer is a localhost on which i have mysql and php.
After several tries i dicided to come here and ask for help.
Code:
Imports MySql.Data.MySqlClient
Public Class frmMain
Dim MySqlConnection As MySqlConnection = New MySqlConnection
Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
MySqlConnection.ConnectionString = "Server=localhost;User Id=wilson382;Password=PmYlm123;Database=wil_practice"
Try
If MySqlConnection.State = ConnectionState.Closed Then
MySqlConnection.Open()
MsgBox("Sucessfully connected to MySQL Database")
Else
MySqlConnection.Close()
MsgBox("Connection failed")
End If
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub
End Class