1. Download Mysql connector from following link and install
http://dev.mysql.com/downloads/connector/net/[
^]
2. Add Reference (MySQL.Data)
3. Namespace
Imports MySql.Data;
Imports MySql.Data.MySqlClient;
4. Connection String
"Server=Localhost;Database=dbTesting;Uid=root;Pwd=password;"
5.
Private Sub ConnectDataBase()
Try
Dim con As MysqlDbConnection
Dim ConStr As String
ConStr = "Server=Localhost;Database=dbTesting;Uid=root;Pwd=password;"
con = New MYsqlDbConnection(ConStr)
con.Open()
Catch ex As Exception
Throw ex
End Try
End Sub