QSqlDatabase: QMYSQL driver not loaded
-
link text
After following above link and building sqldrivers (visual studio 2019, Qt 5.14.0), I am still getting this error,QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7 ERROR: Adding database failed!
any idea what am I missing?
I have also added libmysql.dll to qt bin folder and also tried with setting system variable. but still come this error.Thanks.
-
link text
After following above link and building sqldrivers (visual studio 2019, Qt 5.14.0), I am still getting this error,QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7 ERROR: Adding database failed!
any idea what am I missing?
I have also added libmysql.dll to qt bin folder and also tried with setting system variable. but still come this error.Thanks.
-
Or by simply copying the needed dlls (e.g. by searching them with Dependency Walker) to the application directory: https://doc.qt.io/qt-5/sql-driver.html#qmysql
-
I meet the similar situation, Trying my post?
the new vision of qt also support the new dll, only thing you neet to do is reinstall the whole qt which vision 5.14.2.
If it is not work, you should put the libmysql.dll on the same folder which is your .exe file generaled.
-
Hi,
Please avoid using all caps word like that, it's considered shouting in written language and rude.
As for your issue, did you make sure that the MySQL dlls are found at runtime ?
-
@Mounir Did you have a look here?
https://forum.qt.io/topic/113840/mysql-not-defined-when-compiling-mysql-driver/37I had a similar issue and the problem was that the
libmysql.dll
file needed 2 additional dll to work (LIBSSL-1_1X64.DLL
andLIBCRYPTO-1_1-x64.DLL
). You can check that by opening yourlibmysql.dll
and in the dependancy walker. -
Hi,
Please avoid using all caps word like that, it's considered shouting in written language and rude.
As for your issue, did you make sure that the MySQL dlls are found at runtime ?
@SGaist said in QSqlDatabase: QMYSQL driver not loaded:
Hi,
Please avoid using all caps word like that, it's considered shouting in written language and rude.
As for your issue, did you make sure that the MySQL dlls are found at runtime ?
Sorry SGaist i was frustrated i didn't paid attention
-
Hey I'm try to solve this problem. When i run the code, "qmake--MYSQL_INCDIR="%Mysql%/MySQL Server 8.0/include"MYSQL_LIBDIR="%Mysql%/MySQL Server 8.0/lib" " it's show me the message " QMake has two modes, one mode for generating project files based on some heuristics, and the other for generating makefiles. Normally you shouldn't need to specify a mode, as makefile generation is the default mode for qmake, but you may use this to test qmake on an existing project " How can i solve this?