Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Problem with mysql driver
Qt 6.11 is out! See what's new in the release blog

Problem with mysql driver

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 746 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.
  • B Offline
    B Offline
    burtek
    wrote on last edited by
    #1

    Hi,

    I'm trying to create application that connects to mysql database. However I'm getting an error:

    QSqlDatabase: QMYSQL driver not loaded
    QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7
    

    I spent last 3 hours searching solution on the internet and found out, that running ldd /opt/Qt/5.5/gcc_64/plugins/sqldrivers/libqsqlmysql.so | grep "not found" outputs:

            libmysqlclient_r.so.16 => not found
            libssl.so.10 => not found
            libcrypto.so.10 => not found
    

    I'm unable to find those three anywhere on the web. Where can I find them and where should I put them?

    I'm using Linux Mint 17.3 x64, Qt 5.5

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

      Hi,

      Do you have the MySQL client libraries installed and OpenSSL libraries installed in you system ? If so check their versions. They are likely to be more recent.

      If that's the case, the most simple way is to install the dev packages for OpenSSL and MySQL and rebuild the MySQL plugin. The build process is explained in Qt's SQL driver documentation.

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

      B 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Do you have the MySQL client libraries installed and OpenSSL libraries installed in you system ? If so check their versions. They are likely to be more recent.

        If that's the case, the most simple way is to install the dev packages for OpenSSL and MySQL and rebuild the MySQL plugin. The build process is explained in Qt's SQL driver documentation.

        B Offline
        B Offline
        burtek
        wrote on last edited by
        #3

        @SGaist It took me some time, but with help of this tutorial (which I really recomend) I managed to rebuild the mysql driver. Thank you!

        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