Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

[SOLVED] OpenSUSE12.3 Qt 5.1.1: QMYSQL-Driver is found valid, but not loaded



  • Hello all,

    I've searched the forums over and over but can't find any hint for my problem.

    On an openSUSE 12.3 64bit system I installed Qt5.1.1 using the online installer. Everything seemed to work fine.

    When trying to add a default database connection using QSqlDatabase::addDatabase("QMYSQL") the output is as follows:
    "QSqlDatabase: QMYSQL driver not loaded
    QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7"

    Hmmm... the driver seems to be where it belongs but can't be loaded?

    When I just change the driver type from QMYSQL to QSQLITE this message misses...

    Any hint?


  • Lifetime Qt Champion

    Hi,

    Do you have the mysql client libraries installed on your system ?



  • I'd think so.
    The mysqld runs on a remote computer but on my developing machine I have MySQL Workbench running in full featured mode beeing able to access the database on that remote server.

    Or is there anything else I should care about?


  • Lifetime Qt Champion

    Run ldd on the plugin to see it if misses something



  • Doing that it claimed that libmysqlclient_r.so.16 was missing.
    Somehow RPM missed to install the required soft link on libmysqlclient.so.
    Doing this manually solved this issue.

    Thank you very much!!!


  • Lifetime Qt Champion

    You're welcome !

    You might be missing some dev package on your system that does add this soft link


Log in to reply