qt 5.8 sql connection error:QMYSQL driver not loaded on windows 10

后端 未结 5 939
别跟我提以往
别跟我提以往 2020-12-06 19:24

When i tried to connect to mysql, there is a error:

QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODB         


        
5条回答
  •  旧巷少年郎
    2020-12-06 19:45

    There are 64 bit and 32 bit versions of libmysql.dll. rebuilding the Qt Driver is NOT a must.

    With the prebuilt version of Qt5.9.1, you still need to use the 32 bit version, it worked even with the 64 version of MySQL installation. without any rebuild of QT plugins or components. Download 32 bit MySQL connector here

    This was already answered here: medasumanth answer

提交回复
热议问题