I have connected VB.net and mySQL on a the same PC before, but I have no Idea how to connect VB.net to a remote PC(LAN)
I've only changed the server
This is my code. I removed some of the details, but it works on server=localhost
(Toggle Plain Text)
conn = New MySqlConnection()
conn.ConnectionString = "server=192.168.1.4;" & _
"user id=root;" & _
"password=;" & _
"database=system"
Try
conn.Open()
MsgBox("You have control")
conn.Close()
Catch ex As Exception
MsgBox("Connection Failed")
End Try
I have turned off firewalls from both sides, and it keeps returning "Connection Failed"
1 Replies - 1766 Views - Last Post: 20 January 2012 - 07:27 PM
#1
Connecting to a Remote Database(mySQL) on LAN and vb.net
Posted 20 January 2012 - 07:16 PM
Replies To: Connecting to a Remote Database(mySQL) on LAN and vb.net
#2
Re: Connecting to a Remote Database(mySQL) on LAN and vb.net
Posted 20 January 2012 - 07:27 PM
This is Working for me
conn = New MySqlConnection("server=99.65.0.9;Port=3306; user id=user; password=password; database=Database")
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote



|