I have a piece of C# code that I am compiling in MonoDevelop under Ubuntu 11.10. I have referenced MySql for Mono (using MySql.Data.MySqlClient;) and it works nicely if I try the same code under Windows. I had to rename the mysql.data.dll file to MySql.Data.dll for making it work in Linux though.
When I try to open the Mysql connection, I get this stacktrace on the Ubuntu box from within MonoDevelop:
at MySql.Data.MySqlClient.NativeDriver.Open () [0x00000] in <filename unknown>:0
at MySql.Data.MySqlClient.Driver.Open () [0x00000] in <filename unknown>:0
at MySql.Data.MySqlClient.Driver.Create (MySql.Data.MySqlClient.MySqlConnectionStringBuilder settings) [0x00000] in <filename unknown>:0
at MySql.Data.MySqlClient.MySqlConnection.Open () [0x00000] in <filename unknown>:0
My executing code looks like this where _dbConn is a MySqlConnection:
string connectionString = String.Format("Server={0};Database={1};User ID={2};Password={3};Pooling=false",
DbLocation, DbData, DbUser, DbPassw);
_dbConn = new MySqlConnection(connectionString);
//On the Open, I get the error
_dbConn.Open();
Anyone ever seen this issue and/or have any idea how to work around it? Note: I am using the latest version of MySql .Net Connector for Mono.