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. Have some problems using mysql in qt5.7
Forum Update on Monday, May 27th 2025

Have some problems using mysql in qt5.7

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
2 Posts 2 Posters 657 Views
  • 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
    shyyhs
    wrote on 27 Jul 2016, 13:40 last edited by
    #1

    Thank you very much!
    I think qt is short of mysql driver. I've been working on it for two days but what googles says always don't suit my situation.
    When running a program with mysql, it says:
    QSqlDatabase: QMYSQL driver not loaded
    QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7

    I tried this
    but when "qmake "INCLUDEPATH+=/usr/include/mysql" "LIBS+=-L/usr/lib/mysql -lmysqlclient_r" mysql.pro"
    it tells me "qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory"
    But I don't figure out what it means.
    What should I do? Thanks a lot !

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 27 Jul 2016, 22:04 last edited by
      #2

      Hi and welcome to devnet,

      You are calling the wrong qmake version. You should use the full path to your Qt 5.7 qmake.

      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

      1/2

      27 Jul 2016, 13:40

      • Login

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