VB 2005 + MySQL Connector/.NET 5.0 = Errorcode -2147467259
Posted by: Csiák-Sedivy Gyula
Date: October 27, 2006 06:47AM

Hi there,

I am trying to connect to a remote (and latest version of) MySQL database server.
The port 3306 is open on the Windows Firewall, and I have tested the remote connection with a MySQL Administrator.

The Administrator application could succesfully login, so I started to create my own solution.

My source code looks like this:

Imports MySql.Data.MySqlClient
Imports MySql.Data.Types
Imports System.Data

Module MLMFuncModule

Public Sub LoginCheck(ByVal LoginUser As String, ByVal LoginPass As String)
Try
Dim AuthConnStr As String = String.Format("Persist Security Info=False;Data Source={0};Database={1};User ID={2};Password={3}", _
"123.456.789.123", _
"TestDB", _
LoginUser.Trim, _
LoginPass.Trim)


Dim LoginConnection As New MySqlConnection(AuthConnStr)
LoginConnection.Open()

Catch ex As Exception
MsgBox("Connection Error!" + Environment.NewLine + Environment.NewLine + _
ex.Source + ": " + Environment.NewLine + Environment.NewLine + _
ex.Message, MsgBoxStyle.Critical, "Kivétel HIBA")
Return False
End Try
End Sub
End Module

I have added the Binary file of the MySQL Connector/.NET 5.0 as Reference to my project, but I cannot connect to the remote database using the same port, same address, same catalog, same user, same password as I was using in MySQL Administrator.

How come, that the MySQL Administrator can login to a remote MySQL Server, but my application cannot do it with same parameters?

WHAT IS WRONG???

Hope you can help me, thank you very much in advance...

Best Regards,

cssgyula

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.