Closed dndrade closed 3 years ago
Hi, I'm gonna need more information what exactly does not work, which version you use, what you have tried so far, etc. Maybe there are some hints in the console output, if you set the QT_DEBUG_PLUGINS environment variable to value = 1, in Qt Creator project run settings:
thanks for getting back to me! I was using QT 6.0.3. But Now I'm trying to make it work on an older version (5.11). The console output was always the same: QMYSQL driver not loaded. I have tried to put the files on the bin folder, as well as the project folder and none worked. Since I'm fairly new to QT, I'm thinking that I must be missing something on how to do the proper set up. I'm doing this for my honors project at college, is there anyway you could walk me trough this set up if you're available? Like a paid one hour tutoring?
Actually there is not that much to set up. You only need to make sure that you use the correct version of the files provided here (Matching Qt version, matching compiler: MSVC or MinGW, and matching bitness: 32 bit or 64 bit. For example I don't provide the SQL driver files for Qt 5.11 (since it is outdated). I show you screenshots of my sample project:
In this example I set the Qt version to 6.0.4 and MSVC 64 bit compiler in that case you require the corresponding files from here
The debug build directory looks like this
and contains the project executable (in my case qttest2.exe), libmysql.dll, libcrypto-1_1-x64.dll, libssl-1_1-x64.dll plus a subdirectory "sqldrivers" that contains the debug build of qsqlmysql (i.e. qsqlmysqld.dll)
That should be all to set up
I have followed the instructions, and this is how my project looks like:
Now, QMYSQL appears on the list of the drivers, but still doesn't load.
This is how I'm trying to access the db
So I've just realized, that since when I tried with the 5.11 didn't work. I reinstalled the latest version, an in a matter of days it went from 6.0.3 to 6.0.4 to 6.1.0 (which is my current version). This is probably why I'm getting the drivers listed but not loading, correct?
I didn't make a release for version 6.1.0 yet, so it can't be used just yet
Got it! I'm already happy that the drivers are showing on the list. That's progress! I'll be on the look out for your next release so I can try again. Thank you so much!
The release for 6.1.0 MinGW is here
It WORKED! You are the best!!! Thank you so much! You saved my school project. <3
I'm glad I could help
Any chance there's an update video on how to properly do it? It's not working on my end.