We help IT Professionals succeed at work.
Get Started

The query builder failed. Unable to connect to any of the specified MySQL hosts.

1,195 Views
Last Modified: 2018-04-19
I have a large Windows desktop project written in C# using Visual Studio 2013 Pro. There are 8 datasets that connect remotely to a MySQL database. This code has worked for years. The connection string in the project string settings will connect just fine. When I open a dataset in designer view and attempt to add a new table clicking the "Query builder..." button it produces the error "The query builder failed. Unable to connect to any of the specified MySQL hosts." (attached screen shot). If I attempt to enter a query manually at the end of the wizard there is an error "Object reference not set to an instance of an object" for a simple select statement.  

The only changes are MySql.Data updated from  6.7.4 to 6.10.4 via NuGet and .NET Framework went from 4 to 4.5.2 (to match the dependency of the new MySQL upgrade). I have checked the Machine.config file and the proper versions updated properly.

Another issue is after the upgrade I lost the designer.cs files to the datasets. I attempted to run the Custom Tool on each of the .xsd files for the datasets and get "the custom tool 'MSDataSetGenerator' failed. Failed to generate code. Object reference not set to an instance of an object." I think the two issues are related. I am pressed to get this fixed for release.

Error when custom tool is run.Successful test in string area.Error when attempting to add a table adapter.Manual entry of query.
Comment
Watch Question
President/CEO
Commented:
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE