Jump to content

VB 2008 and MYSQL


Recommended Posts

I am writting ( attempting ) a small app and in the app I need to talk to a mysql db

So I have 4 fields for user input

 

server ip

dbname

dbuname

dbpass

 

and two buttons

 

test connection

and

connect

 

I am using this code for my Test Connection Button

 

 

Dim conn As New MySql.Data.MySqlClient.MySqlConnection
        Dim myConnectionString As String

        myConnectionString = "server=192.168.4.3;" _
                    & "uid=root;" _
                    & "pwd=d3dikatian;" _
                    & "database=eq2server;"

        Try
            conn.ConnectionString = myConnectionString
            conn.Open()

        Catch ex As MySql.Data.MySqlClient.MySqlException
            MessageBox.Show(ex.Message)
        End Try

 

But when I debug and hit the button it says cant connect to 192.168.4.1

 

but in the code I am not trying to connect to 192.168.4.1, I am trying to connect to 192.168.4.3

 

So what I am thinking is the code or connector.. isnt trying to connect to the remote mysql.. so I am lost..

 

Any help would be apreciated

Link to comment
https://forums.phpfreaks.com/topic/112374-vb-2008-and-mysql/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.