Solved Deployed QT app will not connect to Mysql on a certain Windows computer but will on others.
-
Hello,
I have a QT app that connects to a mysql database. I have it working fine on MOST windows computer but one of the main people I built it for, it does not work on that Windows 10 machine. I have tested it on 2 other windows 10 machines and it works fine on them as well as the one it was developed on.
The error is unable to load mysql driver. I understand there is tons of these questions out there but this one is different as it is one computer causing the issue.
When I look at the QT_DEBUG_PLUGINS trace on the computer it loads qsqlited.dll,qsqlmysqld.dll,qsqlodbcd.dll,qsqlpsqld.dll then when it hits qsqlmysqld.dll it says it cannot locate it. It is in the same directory it is looking.
The libmysql is in the root and I have tried moving it all through the directory structure as there is no explicit mention of trying to load it in the debug plugins trace.
Any have any experience with an application connecting on some computers and not others that are the same OS?
Thanks,
--James -
If you're using libmysql from MySql 8.0, it needs VS2015 runtime and openssl 1.0 dlls in the PATH or with the application.
Could that be the reason? -
@JSher
I believe Windows may report it cannot "find" a DLL to load if a dependency is missing. You should test on bad machine as @SGaist wrote in other thread:One thing you can do is run Dependency Walker on these various machines to check is there's a difference with the dependencies of the MySQL dlls.
Also you talk about
when it hits
qsqlmysqld.dll
it says it cannot locate it
Thelibmysql
is in the root and I have tried moving itlibmysql
!=qsqlmysqld.dll
, so not sure what you are looking at. -
Ive ran the dependency walker and cannot see anything amis.
I say libmysql because my thought was that qsqlmysql may be crashing because it cannot find it....I have tried moving qsqlmysql around as well, nothing....
-
If you're using libmysql from MySql 8.0, it needs VS2015 runtime and openssl 1.0 dlls in the PATH or with the application.
Could that be the reason? -
@Bonnie I am using 6.1, does this still apply? Ill have a look
Thanks,
--James -
@JSher
6.1 what exactly? There is no MySQL 6.1 :)
https://en.wikipedia.org/wiki/MySQL#Release_history -
@JonB Sorry mysql connector 6.1...One of the last ones to include a built libmysql.dll/lib
--James
-
@JSher connector/c 6.1.11, right? It will still need VS2015 runtime
-
@Bonnie Your solution worked with VS2015. Thanks!!
--James