Solved Cant connect to mysql database: QMYSQL driver not loaded
-
@cdwijs said in Cant connect to mysql database: QMYSQL driver not loaded:
Hi All,
I'm one step closer to my goal, I can now build the plugin. I cannot yet connect to my database.
Steps I've taken:- Download and install https://downloads.mysql.com/archives/get/file/mysql-connector-c-6.1.11-win32.msi
- Add C:\Qt\Tools\mingw530_32\bin and C:\Qt\5.10.1\mingw53_32\bin to the path
Hi,
I am struggling with the same issue, where exactly did you add C:\Qt\Tools\mingw530_32\bin and C:\Qt\5.10.1\mingw53_32\bin to? -
@hobbyProgrammer I've added them to the PATH. On widows7, you can find that setting here:
start->control panel->system and security->system->Advanced system settings->Advanced->Environment Variables->System variables->Path->Edit...You can see the current value of the path variable by start->run->cmd and the command:
echo %PATH% -
@cdwijs thanks, but unfortunately it didn't work for me :(
-
@hobbyProgrammer Did you log out and log in after changing PATH?
-
@jsulm open the cmd again or log out as a computer user?
-
@hobbyProgrammer Log out as user and login again, then check in terminal as @cdwijs suggested.
-
@hobbyProgrammer
In the time it takes to wait for an answer, and in order to be simply confident everything sees the new environment variable, isn't it just quicker to completely log out & in or even reboot and then you know for sure where you are?! -
This post is deleted! -
Hello,
I have gone through the same issue. there are 2 libmysql.dll libraries version. One for 32 and the other for 64 bits.
These 2 files are both available inhere :
https://www.dll-files.com/libmysql.dll.htmlI advise you to do the following.
-
create a folder in the C drive and name it as you wish and set the PATH to include that folder.
-
Step number 2, reload your system.
-
Step number 3 copy one of the 2 files libmysql.dll in that folder and try to run your binary if this doesnt work then try the second one.
This should work!
have a good day!
-
-
@Back2coding downloading .dlls from 3rd party website like that is usually a bad idea. You do not know what might lurk in there.