mySQL connection problems

This forum is for programmers who have questions about the source code.
Post Reply
JLM
Posts: 128
Joined: Wed Dec 05, 2012 12:52 pm

mySQL connection problems

Post by JLM » Tue Jun 12, 2018 3:13 pm

Did something change recently with windows that suddenly interferes with mySQL connections?
I have a couple of utilities that read data from the OD db and they both quit working after running for years. I haven't upgraded mysql or OD recently.
Strangely, I can run the utilities successfully from VS2017 environment, I can run them from the release folder, but if I copy the release folder to the server or another workstation, they won't run from there.
OD still runs fine.

Code: Select all

MySql.Data.MySqlClient.MySqlException (0x80004005): Unable to connect to any of the specified MySQL hosts. ---> System.Net.Sockets.SocketException (0x80004005): An invalid argument was supplied
Any ideas?

JLM

User avatar
jsalmon
Posts: 1551
Joined: Tue Nov 30, 2010 12:33 pm
Contact:

Re: mySQL connection problems

Post by jsalmon » Tue Jun 12, 2018 4:45 pm

Quite a bit of people have been having MySQL problems after a Windows update:
viewtopic.php?f=1&t=6811
However, "An invalid argument was supplied" makes it sound like a MySQL change of sorts. What is the exact version of MySQL that you are using and what are the arguments that you are supplying (you can provide dummy data in your example)?
The best thing about a boolean is even if you are wrong, you are only off by a bit.

Jason Salmon
Open Dental Software
http://www.opendental.com

JLM
Posts: 128
Joined: Wed Dec 05, 2012 12:52 pm

Re: mySQL connection problems

Post by JLM » Wed Jun 13, 2018 4:05 pm

What is the exact version of MySQL that you are using and what are the arguments that you are supplying (you can provide dummy data in your example)?
OD->Help->About says 5.5
Dataconnector in VS2007 says 8.0.11.0 (latest version from NuGet) .Net 4.6.2
report.ConnectionString = string.Format("server={0};user=root;port=3306;database=opendental;sslmode=none;", ServerID); ServerID is taken from computername key in freedentalconfig.xml . Substituting the ip address instead of computername doesn't help.

I just thought that you might be aware of something in a recent windows update that caused problems with MySQL connections. If it were, I assumed that you would have had scads of tech support contacts and would know what was up.


Thanks,

JLM

User avatar
jsalmon
Posts: 1551
Joined: Tue Nov 30, 2010 12:33 pm
Contact:

Re: mySQL connection problems

Post by jsalmon » Wed Jun 13, 2018 4:57 pm

It's most likely your data connector. I just installed v8.0.11 the other day for testing purposes and I had to include "SslMode=none" in my connection args. You probably have to do the same plus remove something that is no longer supported (since your error is about an invalid argument).
The best thing about a boolean is even if you are wrong, you are only off by a bit.

Jason Salmon
Open Dental Software
http://www.opendental.com

Post Reply