Mysql Driver Not Loaded Windows

Posted on by admin

You have downloaded MySQL Connector/ODBC (ODBC driver) from MySQL – Connector/ODBC. And when you’re trying to install it on Windows, you receive error message similar as the following:

Solution

MySQL Connector/ODBC requires Microsoft Visual C++ 2010 redistributable so you have to install it first.

Hi, I see tons of posts related to this. But, I still have the same issue after running through several of the solutions in these posts. I used the full path for the jar, and it's not an empty file. I'm running windows. Qt5.9.1 QMYSQL driver won't load. Ask Question Asked 1 year, 11 months ago. PyQt5 mysql driver not found. Installing Windows to flash BIOS, then reinstalling Ubuntu Is it possible to grow new organs through exposure to radioactivity?

If you want to install MySQL Connector/ODBC 32-bit version, you have to download and install Microsoft Visual C++ 2010 Redistributable Package (x86).

If you want to install MySQL Connector/ODBC 64-bit version, you have to download and install Microsoft Visual C++ 2010 Redistributable Package (x64).

After you installed Microsoft Visual C++ 2010 redistributable, you can try reinstall MySQL Connector/ODBC again, the issue should be resolved this time.

Added solution from a user, VCD:

For me, I am installing mysql-connector-odbc-5.3.6-win32.msi, Microsoft Visual C++ 2010 Redistributable Package (x86) doesn’t work for me. However Visual C++ Redistributable Packages for Visual Studio 2013 works.

Not

You can find Visual C++ Redistributable Packages for Visual Studio 2013 at
https://www.microsoft.com/en-us/download/details.aspx?id=40784

Active10 months ago

My program is write with QT5.2 and use mysql. I heared that QT5.2 contains MYSQL driver already. However, when I compile and run my program, it is compiled successfully but runned failed with error:

My programe is like this:

And in .pro I add this:

Mysql is provided by XAMPP.My OS is win7-x64-sp1-ultimate, and XAMPP Version 1.8.2.System Path is as follow:

XAMPP location is :

QT location is:

I have installed mysql server-5.6-64bit in D:SoftwareMySQL, and when it conflicted with mysql in XAMPP, I uninstalled mysql server-5.6-64bit.

huaxz1986huaxz1986

5 Answers

I met with the same error and fixed it successfully by copying file

C:Program Files (x86)MySQLMySQL Connector.C 6.1liblibmysql.dll

into to

C:QtQt5.3.15.3mingw482_32bin

Ram
2,6649 gold badges33 silver badges55 bronze badges
Hồ Sĩ SơnHồ Sĩ Sơn

Qsqldatabase Mysql Driver Not Loaded Windows

I was facing the same issue and even 'Hồ Sĩ Sơn's solution didn't work. I then found out that I had installed a 64-bit version of MySQL and was trying it on a 32-bit version of Qt.

Copying the dll from the below location didn't work:

Click 'Download Now' to start the fast baby video free download process. It also supports, FB, Ins, 1000+ sites. NoTitleViews on YouTube1Charlie Bit My Finger – Again!745,793,7202Baby Shakira80,198,1783Baby Laughing Hysterically at Ripping Paper70,546,5874Two Awesome Dancing Kids60,367,1315Emerson – Mommy's Nose is Scary!56,161,6326Ninja Baby46,998,8237What is so Funny?33,528,7438Aydan's Funny Laugh – He's a Happy Baby! It will later download these video clips for free one by one.Step 2: Choose Output FormatAfter the video is analyzed successfully, select funny baby video format, resolution and file size you want. If your devices for watching downloaded funny baby clips don't have 4K display, try saving videos in 1080p or 720p.Note: MacX YouTube Downloader not only helps to download funny child dancing or laughing videos for free, but also enables to download all other videos, like, kids educational videos, movies, TV shows, clips, sports video, and more.Step 3: Start downloadingSpecify output folder on your computer to save the output files by clicking the Browse button. Download

Instead download the 32-bit version of libmysql.dll from:

and the copy it to your mingw folder.

In my case, I had to copy the DLL to msvc2010 folder since I am using Visual Studio compiler:

Hope this helps. :)

medasumanthmedasumanth

Adding post due to reputation deficit.

I was able to resolve my issue using a combination of Hồ Sĩ Sơn, Ram, and Sumanth's posts (Thank you both).

Here are my exact steps:

Checked the version of Qt Creator that I am running by visiting Help -> About Qt Creator. I found that I am running the 32-bit version.

Now that I know what version I am running I navigated to the 32-bit version of the MySQL connector. This was found in C:Program Files (x86)MySQLMySQL Connector C 6.1lib.

I copied the libmysql.dll file found in that folder, and pasted it into C:Qt5.9.2mingw53_32bin since I am compiling with MinGW. Note that this is the 32-bit folder.

Restarted Qt Creator and rebuilt my project.

The steps that were challenging me were matching the x-bit version of Qt Creator, my compiler, and the driver, then restarting Qt Creator.

Hope this helps someone out there!

Qpsql Driver Not Loaded

Jeramy D.Jeramy D.

I faced the same issue and resolved by below steps.

By doing 6 hours of research finally issue is resolved. I was using 64 bit windows 10, 32 bit Qta and 64 bit MySQL server.

Windows

QSQLITE and QODBC was working perfectly, but faced issue with QMYSQL.

Later I have downloaded 'mysql-connector-c-6.1.11-win32.zip' (if it is 32 bit QT)from https://dev.mysql.com/downloads/connector/c/ copied 'libmysql.dll' to QT path C:Qt5.9.3mingw53_32bin.

Wow. it was working perfectly.

Avag Sargsyan
1,8873 gold badges22 silver badges30 bronze badges
Nagaraj GaonkarNagaraj Gaonkar

I also spent about 2 days on this problem, here's how I solved it:

My setup:64 bit Windows 10QT 5.11.1 and QT Creator 4.7.1 32 bitBuilding a 64 bit app..

Mysql Driver Not Loaded Windows

Download this zip file: mysql-connector-c-6.1.11-winx64.zipfrom this website:https://downloads.mysql.com/archives/c-c/

copy this file:C:.mysql-connector-c-6.1.11-winx64.zipmysql-connector-c-6.1.11-winx64liblibmysql.dll

into this directory:C:Qt5.11.1msvc2015_64bin

Note: change 'msvc2015_64' to whatever compiler you are using, though it needs to be 64 bit.

when deploying your app, copy libmysql.dll to the same directory as your .exe fileI hope this helps you same some time and frustration!

Sam HighfieldSam Highfield

Not the answer you're looking for? Browse other questions tagged mysqlqt or ask your own question.