QSqlDatabase: QMYSQL driver not loaded available drivers: QMYSQL
-
@fennec As I said in a previous post you should check that the MySQL version you're using to build the Qt Driver is in 32bit because you're using a 32bit Qt version.
And really I don't understand why you have two different version of MySQL installed on your machine
-
Hello everybody!
Firstly I'm sorry for resurrecting the thread, but my question is the same of the OP and I don't want to create a new one topic for the same problem.Let me state what's happening with me:
I have Qt 5.7 and also MySQL 5.5 installed on my PC, I'm using mysql database on my program and it works... I do everything with it, read and write on database. No problem here.When I deploy the app using the 'windeployqt' it generates all the dlls needed to the program run BUT the database don't connects and I get the error "Driver not loaded"... Crazy..
The mysql server is running and accessible for external connections. I'm connected on it by MySQL Workbench, so.. it's not about the access, its the driver...
I really don't understand how it works on my PC and the deploied program doesn't.
Please help me!
-
Hi @SGaist, thanks.
Yes, there are the qsqlmysql.dll on sqldrivers folder, and I copied manually the libmysql.dll to the exe folder and the sqldriver folder.
Thing is, the app run on my computer, where I'm compiling and deploying from the deploied folder but I copied the whole program folder to my girlfriend's pc and I get the 'Driver not loaded' error.
I also installed the MySQL Connector C on it, but.. nothing.
Just to make sure I have those dlls on sqldriver folder:
libmysql
qsqlite
qsqlmysql
qsqlmysql4
qsqlodbc
qsqlpsqlThe program just doesn't connect to the database because of drivers.
I can't figure out what to do now :( -
Run Dependency Walker on the plugin to see if it finds anything.
You can also start the application in command line window and use QT_DEBUG_PLUGINS environment variable. That should give you more hints about what is going on.
-
@SGaist said in [Solved] QSqlDatabase: QMYSQL driver not loaded available drivers: QMYSQL:
Run Dependency Walker on the plugin to see if it finds anything.
You can also start the application in command line window and use QT_DEBUG_PLUGINS environment variable. That should give you more hints about what is going on.
Running Dependency Walker on the exe ?
If yes, here is it:
Maybe are the microsoft runtimes missing? Or anything else? I saw that the dll IESHIMS.dll was missing, I found it on Internet Explorer's folder and copied to the exe folder, but still not working.. the app loads but with the 'Driver not found' error..
Thats turning my hairs into grey lol
-
No, not the executable, the Qt MySQL plugin.
-
@SGaist said in [Solved] QSqlDatabase: QMYSQL driver not loaded available drivers: QMYSQL:
No, not the executable, the Qt MySQL plugin.
The qsqlmysql.dll ? If yes..
PS: I already have these dlls on the exe folder. Tried to copy to the sqldrivers folder, but got the same error "Driver not loaded".