Important: Please read the Qt Code of Conduct -

[Solved] Qt 5.3.2 QMYSQL driver not loaded

  • hi !
    I've installed in a pc with Mint 17 Qt 5.3.2 with the installer. File has been generated during installation and it is in the right place. But when I try to connect with mysql db i receive a message "QMYSQL driver not loaded". So, from the source I've generated a new; the command ldd has given this output:

    @ => (0xb77ab000) => /usr/lib/i386-linux-gnu/ (0xb7454000) => /home/achille/Qt/5.3/gcc/lib/ (0xb7412000) => /home/achille/Qt/5.3/gcc/lib/ (0xb6ed7000) => /usr/lib/i386-linux-gnu/ (0xb6dee000) => /lib/i386-linux-gnu/ (0xb6c3e000) => /lib/i386-linux-gnu/ (0xb6c24000) => /lib/i386-linux-gnu/ (0xb6c1e000) => /lib/i386-linux-gnu/ (0xb6c02000) => /lib/i386-linux-gnu/ (0xb6bbc000) => /lib/i386-linux-gnu/ (0xb6b9f000) => /home/achille/Qt/5.3/gcc/lib/ (0xb6975000) => /home/achille/Qt/5.3/gcc/lib/ (0xb67f8000) => /usr/lib/i386-linux-gnu/ (0xb67f5000) => /lib/i386-linux-gnu/ (0xb67ec000) => /lib/i386-linux-gnu/ (0xb66e0000)
    /lib/ (0xb77ac000) => /home/achille/Qt/5.3/gcc/lib/ (0xb5074000) => /lib/i386-linux-gnu/ (0xb5035000)
    I moved the new in the right place but doesn't work.
    I don't know why it's so difficult and what I have to do; in other pc, with Qt 4.8 it was very very easy to connect with a mysqldb.
    Thanks in advance for helping

    [edit: added coding tags @ for better readability SGaist]

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Did you check the error message from QSqlDatabase ?

  • thank you for your answer;
    ok,if I use from default installation I received this message:

    @QSqlDatabase: QMYSQL driver not loaded
    QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7
    otherwise, if I use generated from source no message, but db is not connected.

  • Sorry, I was so stupid.... I din't create a test db correctly ....
    just only need build from (qmake, make) in
    and move it from
    in which is created to
    Good bye !

  • Lifetime Qt Champion

    Don't worry that can happen

    Since you have it working now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)

Log in to reply