PDA

View Full Version : QMYSQL driver not loaded



shadowCODE
21st December 2014, 06:17
Running Qt 5.4 (Based on Qt 5.4.0 (MSVC 2010, 32 bit)).
MySQL Community 5.6

I could not succeed compiling the Qt Source to get the dll. So i downloaded them from here
https://github.com/Mashpy/Qt-MySQL-Driver-For-Windows
and put them in as followed by here
http://seppemagiels.com/blog/create-mysql-driver-qt5-windows

I still get the errors
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
QSqlError("", "Driver not loaded", "Driver not loaded")

Please any one.

wysota
21st December 2014, 09:57
Do you have all the dependencies for QMYSQL? In particular the mysql client library?

shadowCODE
21st December 2014, 11:12
yes. I have mysqlclient.lib in C:\Program Files\MySQL\MySQL Server 5.6\lib.
Do i have to put it somewhere else?

wysota
21st December 2014, 19:21
You have to put it where your application can find it, e.g. in the directory containing your application executable.