MySQL Driver Compiled by MinGW 64bit can't work

  • I have succeed compiling mysql driver with x64-4.8.1-posix-seh-rev2 but in the demo when try to open the database, I got this

    Error - RtlWerpReportException failed with status code :-1073741823. Will try to launch the process directly

    After i try to rebuild the driver for some times, it's still wrong, but the error message is different

    QObject::moveToThread: Current thread (0x256f30) is not the object's thread (0x1c2a210).
    Cannot move to target thread (0x256f30)

    QSqlDatabase: QMYSQL driver not loaded
    QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3
    QSqlError(-1, "Driver not loaded", "Driver not loaded")

    Then I try to use the 32bit version everything goes well.

    Here is my code


    QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
    if ( !"root", "xxxxx"))
    qDebug() << db.lastError();
    qDebug() << "open database succeed!";

        QSqlQuery query;
        query.exec&#40;"show tables;"&#41;;
        while (;&#41;
            qDebug() << query.value(0).toString();


    Best Regards,

  • Try to install 64bit mysqlsever
    I am not sure about it

  • Thanks for you reply.

    Actually, I'm just using 64bit mysql server with ubuntu 13.04 amd64 *version in the virtualbox.

    Best Regards,

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.