PDA

View Full Version : QMYSQL driver not loaded [SOLVED]



Cyraxmax123
7th September 2012, 07:29
Hi! I'm a beginner with Qt and I've run into this problem when I tried to connect to a mysql data base.
None of the solutions found on the interned worked for me.
Until I've found on a russian forum, somebody has uploaded the drivers (dll's) for mysql.
So here they are, I'm re-uploading it, in hope that some newbie will find this useful.
http://ul.to/n2mrbzc5

Just copy-paste it to:
C:\QtSDK\Desktop\Qt\4.7.4\mingw\bin
and
C:\QtSDK\Desktop\Qt\4.7.4\mingw\lib

Somebody could correct me about the location, but for me it worked.

Heme
22nd October 2012, 13:50
Since I found this thread quite easily and since it's not cluttered with any "debugging" I want to add how I solved this issue. I got some grey hairs with compiling the drivers but there are enough good tutorials about that (none actually worked for me 100% but I managed to "compile" a working set from parts of each that worked :D..but I digress)

My "driver not loaded" problem was because every possible guide in the internet told me to put the drivers into "qt\4.x.x\src\plugins\sqldrivers" folder when they in the end had to go to "qt\desktop\qt\4.x.x\mingw\plugins\sqldrivers"

Putting the compiled driver files there solved the issue for me and I was able to connect. Hope someone finds this helpful.

edit: also apologies if this thread now bumps up inconveniently