10/22/2019 Qmysql Driver Not Loaded
QSqlDatabase: QPSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7 I include to PATH variable paths to: PostgreSQL 9.3 bin PostgreSQL 9.3 lib PostgreSQL 9.3 include Also I copy folder sqldrivers to Debug folder. Also tried to copy dlls drom this folder to Debug. Doesn't work either. I am looking for a way to solve the problem in a correct way and do not want to use MACPORTS for installing the QMYSQL module. MACPORTS is a good installation package, but its size is more than 1GB in HDD and I'd prefer to use certified sourced like mysql.com website and qt.io website and so on. Reload creator and voila your mysql driver is perfectly loaded; So basically for those who want to understand what happened here: That 'qsqlmysql' plugin is basically a qt interface that uses mysql-C connector methods. But unfortunately this connector does not distributed with Qt, so you should provide it by yourself.
Active6 years, 1 month ago
I have compiled
qmysql driver plugin and placed debug and release .dll and .lib files in pluginssqldrivers . But when i try qDebug() << QSqlDatabase::drivers(); it still get ('QSQLITE', 'QODBC3', 'QODBC', 'QPSQL7', 'QPSQL') and QMYSQL driver is not available.Any idea?
Qt version : 4.8.4
Compiler : MSVC2010
OS : windows vista (64bit)
Hesam QodsiHesam Qodsi
84933 gold badges2020 silver badges3535 bronze badges
1 Answer
Your application needs libmysql.dll which you can find in the MySQL installation directory. You can copy it to the Qt bin directory or in the same directory of your .exe
Note that you need to restart your IDE (Qt Creator or what ever IDE) after you place new dll files in pluginssqldrivers or Qt bin directory.
RamezRamez
Not the answer you're looking for? Browse other questions tagged qtqt4 or ask your own question.
Active1 year ago
In Short: I am trying to link my Qt5.5 to MySQL but it is not working.
The long story begins when I tried to use
MySQL as in:
But when I run my application, I get the following messages:
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
At this point, I looked online to see how to fix this.
Then I found on Qt Documentation that I need to build the MySQL plugin. So, I followed the guidance:
I started looking all over the internet for solution. Then:
I run my application, but again I have the same error !! So:
However, again I have the same error.
I am now stuck, don't know what to do.
Qmysql Driver Not Loaded Qt Linux
P.S.: I have sql in my .pro file in Qt-application
McLanMcLan
1,28466 gold badges3030 silver badges5959 bronze badges
Qmysql Driver Not Loaded But Available2 Answers
Download the 32-bit version of libmysql.dll; check here for details: qt 5.8 sql connection error:QMYSQL driver not loaded on windows 10
Mohammad A KananMohammad A Kanan
3,0291010 gold badges1515 silver badges3030 bronze badges
My version is QT 5.11.1. I met same problem.I copied
libmysql.dll
from
C:Program FilesMySQLMySQL Server 5.7lib
to
C:QtQt5.11.15.11.1mingw53_32bin.
The whole family will enjoy the next chapter in Sara’s entrepreneurial adventures.That’s right, Sara is back in a brand-new exotic farming adventure! Along with her new friend, Coco, Sara embarks on a new tropical adventure. Free ranch rush 2 game online.
Finally,I succeeded.
Nic3500
3,75188 gold badges2020 silver badges2929 bronze badges
mymymmymym
Qsqldatabase Qmysql Driver Not Loaded QtNot the answer you're looking for? Browse other questions tagged c++mysqlqt or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |