Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to get MySQL plugin to run ?
Hey I started with Qt5 yesterday and since than I have problem like never before.
I installed Qt 5.1.1 and tried the sql browser example because i need database support for
an upcoming project.
The problem is that I get the Error that says :
@QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7@
That wasnt really helpful so far.
As far as i understand the problem is that the plugin exist but it ran into an error.
So I tried to check the dependencies:
libmysqlclient_r.so.16 => not found
And this is what I got. Ok this is the problem I guess. Because I didn't had the mysql devel packages installed
when I installed Qt.
All I have is the :
Is there a way to get this to work ?
I tried to rebuild the plugin but ran into this kind of stuff:
@qmake "INCLUDEPATH+=/usr/local/include" "LIBS+=-L/usr/local/lib -lmysqlclient_r" mysql.pro
Project ERROR: addExclusiveBuilds() requires at least two arguments@
Thanks for any reply.
I'm pretty much stuck at this point.
I can't find a package which provides the libmysqlclient_r.so.16.
Currently I have installed the libmysqlclient18 package and there is no such thing as a libmysqlclient16 available.
So I tried to create a link to my current libmysqlclient_r.so:
@/usr/lib/i386-linux-gnu/libmysqlclient_r.so.16 -> /usr/lib/i386-linux-gnu/libmysqlclient_r.so@
This seems to work in the first place but there has to be a better cleaner way to accomplish this. Any Ideas ?
The sql browser example seem to work but in a stable environment I don't wanna run it this way.
You can try to find an older version of the package which provide that or if you really want to be sure, you can rebuild the mysql plugin using your version of libmysqlclient
It would be a great help if the packages used to build the Plugins were
listet in the documentation. I installed everything mentioned in the doc
but still ran into this situation.
bkerdev last edited by
See this tutorial
"build mysql drivers":http://www.seppemagiels.com/blog/create-mysql-driver-qt5-windows