QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QSQLITE2
You might have come across this error, if you are using Qt SDK from Nokia.
Now follow these steps to get MYSQL working with Qt Creator.
Go to System-> Administration-> Synaptic manager and search "libqt4-sql-mysql" (libqt3-sql-mysql if you are using Qt3) and install the library by right clicking and select Mark for installation.
Now, in your Qt code add this line
qDebug() << QCoreApplication::libraryPaths();
You will see something like this upon running your program.
Now copy libqsqlmysql.so (search it or find it as shown in the above picture) to the above path. You can also use the library by using QCoreApplication::addLibraryPath(QString path).