Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Cannot install driver: QSqlDatabase: QMYSQL driver not loaded



  • Hello,

    I'm trying to access a MySQL database on another sever.
    I followed some tutorials for code to access the database.
    But everytime I'm trying to run my application, the error
    "QSqlDatabase: QMYSQL driver not loaded
    QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7"
    keeps appearing.
    I followed the "How to Build the QMYSQL Plugin on Windows" Turorial from your website.
    I'm using mingw and everytime this error appears "mingw32-make: *** No rule to make target 'sub-mysql'. Stop."
    And when I run the install command, nothing changed. It copied some files, but the QMYSQL driver is still not loaded in Qt Creator.

    I'm using Qt Creator 5.14.2 and the mingw-version is the one, that was installed with the Qt installer.

    Someone else had the issue?
    Can please someone help me?


  • Lifetime Qt Champion

    @JosefSelajo said in Cannot install driver: QSqlDatabase: QMYSQL driver not loaded:

    I'm using mingw and everytime this error appears "mingw32-make: *** No rule to make target 'sub-mysql'. Stop."

    Follow the documentation and make post the output when something goes wrong.


Log in to reply