"Access denied for user `sql12345`@`10.0.29.7`(using password:YES)"
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim conStr As String = "Server=sql3.www.freemysqlhosting.net; Port=3306; User id=sql12345; password=*******; Database=sql12345; Connect Timeout=60;" Dim con As New MySqlConnection(conStr) Try MessageBox.Show("Connecting to mysql database.") con.Open() Dim sqlStr As String = "SELECT * FROM Users" Dim cmd As MySqlCommand = New MySqlCommand(sqlStr, con) Dim rd As MySqlDataReader = cmd.ExecuteReader rd.Read() If rd.HasRows Then MessageBox.Show(rd(0) & " " & rd(1) & " Msg here") Exit Sub Else MessageBox.Show("Could not find something") Exit Sub End If con.Close() Catch ex As Exception MessageBox.Show(ex.Message) End Try End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)