PDA

View Full Version : QT with MySql not running on test computer



dan3460
5th September 2017, 04:07
I have a application that runs perfectly on my laptop, even from the folder that i created to deploy the application. That is the folder where i run windeployqt. The test computer has windows 10, same as mine, but it doesn't have any of MySql packages. The error that i get is "could not load driver". QtsqlMysql.dll is in the sqldrivers folder. Don't know what else to do.

Lesiok
5th September 2017, 06:59
You have to install MySQL client package. Qt sql driver is only interface between Qt application and client package.

dan3460
5th September 2017, 15:51
Well, i tried all kind of different things. I tried to use "dependency walker" to see if i could see what going on to no avail. I downloaded all kind of packages and connectors from MySql website, i even installed mysql workbench and connected to the database. But my application refused to work. Keep telling me that could not load the driver. I'm working on a program that i hope I'm going to sell, when i do i will subscribe to QT customer service but that is too expensive right now, so no finding a solution that can be easily implemented on a customer desktop is not an option. My next step is to compile the program statically, i'm in the process of creating the static compiler for QT. Will let you what happens.

Lesiok
5th September 2017, 17:25
On the target computer must be libmysql.dll (eg in the directory of your application).

dan3460
5th September 2017, 18:06
Yes, i just checked to make sure. I have libmysql.dll on the same directory that the exe is located. Get the same error "could ot load the dirver"

dan3460
5th September 2017, 22:06
My apologies to everyone, it was my stupidity. I was looking at the libmysql.dll, the one that i have been playing with had a time stamp of 8/13/2015, that is the one that i have been using to make the distribution folder. I look on my system and there is a libmysql.dll that is dated 7/13/2017 and it is much smaller. So grabbed that dll and put it on the other system and it works perfectly. My guess is that the older dll is a 64bit, while im compiling everything on 32bit. Again please accept my apologies.