6

I'm assuming this is a bug with the MySQL connector with mono but i thought i'd ask incase somone has found a work around.

I have a VS solution running .net 4(latest mono), i'm using the latest version of the MySQL connector fresh off their website this morning.

If I open the project with visual studio , compile and run the MySQL connector connects to the MySQL database almost instantly and all is well.

If I open the exact same project in MonoDevelop (causing it to be built with mono rather then MS .net4) with not a single line of code changed, the MySQL connector reply's with "Unable to connect to any specified MySQL hosts"

This cannot be a database problem else I would be seeing the problem on both builds. Even remaining in MonoDevelop and building with the MS .net framework from there still results in a good connection.

My connection string contains server, port, uid, password,Connection timeout, database, pooling

More details :

Windows 7 x64 visual studio 2010 Mono 2.10.8 MonoDevelop 3.0.2

I've seen a large number of results from googling my question, but they all seems to be differing issues, or due to old bugs that have since been fixed by method's that certainly haven't worked in this case.

Edit : can anyone replicate what I am seeing here ?

3
  • Have you had any luck figuring this out? Commented Oct 12, 2012 at 13:29
  • I didn't no, I abandoned MySQL for the task I will try again over the next few days Commented Oct 12, 2012 at 17:18
  • 1
    It's likely a mono framework bug. I upgraded from 2.10.1 to 2.10.9 and it solved the problem. Commented Oct 13, 2012 at 23:49

2 Answers 2

1

Try to add "TrustedConnection" as "True" to your connection string. Also make sure you are building as x86 not "Any Cpu". Hope it helps

Sign up to request clarification or add additional context in comments.

Comments

0

Check http://www.mono-project.com/MySQL for MySQL specific instructions. Specifically make sure that MySql.data.dll is in the GAC:

cd path_to_your MySql.Data.dll assembly
gacutil -i MySql.Data.dll

There is also some example code on the site that may help.

Best of luck.

1 Comment

The absence of the assembly is clearly not a problem here, thanks though

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.