Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.