Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all articles
Browse latest Browse all 1447

VB.net can't connect (2 replies)

$
0
0
We are having some performance issues with our main database server and I wanted to see how our mySql server would perform. However I'm not able to connect to it for some reason. Quick back ground: our linux server with mySql is currently just being used lightly as a web server for our intranet site and this will be the first time trying it in this manner. We've only had the server running for about 15 days now so it's still new to us.
This is the code I have:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim con As New MySqlConnection()

Try
con.ConnectionString = "server=linuxserver;uid=user123;pwd=pass456;database=intranet;"
con.Open()
MessageBox.Show("Connection Opened")

Catch ex As MySqlException
MessageBox.Show("Error: " & ex.ToString())
Finally
con.Close()
MessageBox.Show("Connection Closed")
End Try

End Sub

I can ping linuxserver from the client and it does respond plus I have tried using the IP Address and I get the same error
I'm using the uid and password I use when I log into mySql obviously not what's displayed and I get Host is not allowed to connect to this mySql server

I'm using vb.net 2005 for this test.

Almost forgot, I have turned the firewall off and still getting the error

Viewing all articles
Browse latest Browse all 1447

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>