Qt 6.11 is out! See what's new in the release
blog
QSqlDatabase: QMYSQL driver not loaded
-
This problem seems common but I couldn't find a proper solution. I'm developing a project that requires MySQL database. Every time I try to connect, I get this error:
QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7It tells me the driver is available but can't be loaded.
I'm using Qt 5.9 in Windows 10. I'm using
Qt 5_9_1_MinGW_32bit-DebugI've built the sqldrivers and they are listed inC:\Qt\5.9.1\mingw53_32\plugins\sqldriversAlso, I've installed MySQL community server. For
.pro, I've includedQT+=sql. I'm not sure what issues may cause this problem. ChangingQMYSQLtoQSQLITEmade the connection but failed to retrieved data from the dababase. In the source code,QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL"); -
Hi,
Do you have a MinGW build of MySQL on your system ?