Tag Archives: QMYSQL driver not loaded error

How to Solve QSqlDatabase Error: QMYSQL driver not loaded

When you use QT’s QSqlDatabase to operate the database, you will be prompted

QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7

Make sure there is libqsqlmysql.so file and it has been put into QT/GCC/plugins/sqldivers/directory, if the problem can not be solved

Enter the/usr/lib/i386 Linux GNU directory and execute ln – s libmysqlclient_ r.so libmysqlclient_ r.so.16