Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. How to get MySQL plugin to run ?
Forum Updated to NodeBB v4.3 + New Features

How to get MySQL plugin to run ?

Scheduled Pinned Locked Moved Installation and Deployment
5 Posts 3 Posters 5.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Schneidi
    wrote on last edited by
    #1

    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:
    @ldd libqsqlmysql.so
    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 :
    @ /usr/lib/i386-linux-gnu/libmysqlclient_r.so.18
    @
    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.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Schneidi
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        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

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Schneidi
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          • B Offline
            B Offline
            bkerdev
            wrote on last edited by
            #5

            See this tutorial
            "build mysql drivers":http://www.seppemagiels.com/blog/create-mysql-driver-qt5-windows

            Boris Bker

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved