[Mono-osx] MySQL connector not working on Mac
cthielen at gmail.com
Thu May 12 19:00:04 EDT 2011
I'm sending this to the OS X Mono list because the problem only exhibits itself on my Mac.
I've got a basic MySQL connector test using version 6.3.6 (latest as of today) of the MySql .NET connector:
public static void Main (string args)
string connStr = "Server=localhost;Uid=root;Pwd=;Database=RightsManagement;";
//string connStr = "Database=RightsManagement;Server=127.0.0.1;User Id=root;Password=something;Pooling=false;";
conn = new MySql.Data.MySqlClient.MySqlConnection();
conn.ConnectionString = connStr;
catch (MySql.Data.MySqlClient.MySqlException ex)
Now, using the mysql CLI program, I can connect to localhost just fine as root (the password is actually blank). This demo also works perfectly on my Linux laptop with the same version of Mono/MonoDevelop and MySQL installed.
But on Mono on my Mac, I receive:
MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts.
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.MySqlPool.CreateNewPooledConnection () [0x00000] in <filename unknown>:0
at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection () [0x00000] in <filename unknown>:0
at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver () [0x00000] in <filename unknown>:0
Now, I've seen this error all over Google but the results are either old or corrected by silly things like folks not having networking enabled on their MySQL server or having a firewall block the port. That isn't the case here, as far as I can tell.
Anybody seen this before? Anybody using MySQL on their Mac locally and connecting to it via Mono / MySQL .NET connector?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-osx