Problem with mysql driver

  • 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/ | grep "not found" outputs:

   => not found
   => not found
   => 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

  • Lifetime Qt Champion


    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.

  • @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!

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.