List:MySQL and .NET« Previous MessageNext Message »
From:Bob Smith Date:June 25 2011 1:00am
Subject:C# MySql
View as plain text  
Hello, I am getting a failure to connect when I attempt to use the
MySQLConnection object in C#.  I use the code

string CS = "Server=" + this.m_ServerName +
                                                        ";Port=" +
this.m_Port +
                                                        ";Database=" +
this.m_Database +
                                                        ";Uid=" +
this.m_UserName +
                                                        ";Pwd=" +
this.m_Password +

//create a new mysqlconnection
m_DatabaseConnection = new MySqlConnection( CS );

ServerName is something the IP (something like 192.168.1.X of the Linux
server IP)
Port is 3306
The rest is the authentication credentials that allow me to log in using
literally every other tool I can find.

I am able to easily create a connection using the MySQL Workbench and even
from the command line using these exact same credentials.

I have disabled all of my firewalls to test this (but I can still connect
via other means anyways).  Am running windows 7 64bit but am compiling
against .NET 1.1 for 32bit.  I have been trolling the net for a solution to
this for a week with no luck.

Please help.

C# MySqlBob Smith25 Jun