When i tried to connect to mysql, there is a error:
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODB
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