QSqlDatabase: QMYSQL driver not loaded
-
wrote on 27 Jan 2020, 09:50 last edited by nn26
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.
wrote on 28 Jan 2020, 06:57 last edited bysolved by setting MySQL path in user variable for administrator instead of setting it in system variable.
-
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
-
wrote on 4 May 2020, 01:07 last edited by
hey pleas can you help me how to seeting Mysql path
-
wrote on 4 May 2020, 02:05 last edited by
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.
-
wrote on 4 May 2020, 19:34 last edited by
THANX BRO I FOLLOWD ALL STEPS AND I BUILD QMYSQL DRIVER BUT IT NOT LOAD
-
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 ?
-
wrote on 5 May 2020, 20:01 last edited by
@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 ?
wrote on 7 May 2020, 20:53 last edited by@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
-
wrote on 23 May 2020, 20:34 last edited by
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?