Solved QMYSQL Driver not loaded
-
You have already compiled the driver?
Download from here: https://dev.mysql.com/downloads/connector/cpp/ and follow the instruccions:
http://doc.qt.io/qt-4.8/sql-driver.htmlYou need a sqldriver folder with the plugin under your run directory
-
@hrompato I've installed it using the installer. Do I have to compile it by myself?
-
Yes, see my comments over
-
@hrompato will it work if I install
libmysqlcppconn-dev
using my package manager? -
@hrompato I'm sorry but I can't figure out how to do the things you just mentioned could you explain how to do them in more details? There's no directory name
src/plugins/sqldrivers/mysql
anywhere within my Qt installation path. -
@morkia in Linux, if you install libmysqlcppconn, doesn't need compile the plugin.
Try it -
@hrompato I did but the problem is still there.
-
This post is deleted! -
@morkia It works for me
I'm using /usr/lib/libmysqlcppconn.so.7 and Qt5.5.1 in Debian.What is the distribution that you use?
You have declared Qt + = sql in the pro file? -
Here's what I did. I just compiled the plugin in
Src/qtbase/src/plugins/sqldrivers/mysql
usingqmake mysql.pro
and thenmake
andmake install
and that did the trick. I also Installedlibmysqlcppconn7
andlibmysqlcppconn-dev
byapt-get
.