QSqlDatabase: QMYSQL driver not loaded
-
QSqlDatabase: QMYSQL driver not loaded
Hello there,
I've got a problem with the MySQL driver in my QT- C++ project.
I already tried several solutions from the internet but nothing worked.
Under C:\Qt\6.3.1\Src\qtbase\src\plugins\sqldrivers is already a MySQL folder with the driver files.The error call is:
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QODBC QPSQLMy used QT- version is 6.3.1 in Visual Studio 22.
Is there any solution I could try next? The project code is at Github.Thanks for youre help!
Patrick -
-
@Patsch36 need to install libmysql.dll and follow Readme
-
@anil_arise
Thanks for your answer!
I followed the instructions step by step and the driver got installed.
Now the error message is
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMARIADB QMYSQL QODBC QPSQL
How can be the driver now available but does still not work? -
@Patsch36 said in QSqlDatabase: QMYSQL driver not loaded:
How can be the driver now available but does still not work?
Set QT_DEBUG_PLUGINS environment variable before starting your app, then post the output from terminal here.
https://doc.qt.io/qt-6/debug.htmlAlso, exact same questions is asked many many times, please search in this forum.