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. QSqlDatabase: QMYSQL driver not loaded
Forum Updated to NodeBB v4.3 + New Features

QSqlDatabase: QMYSQL driver not loaded

Scheduled Pinned Locked Moved Solved General and Desktop
qmysqlqsqldatabaseubuntu 14.04driver not load
28 Posts 6 Posters 27.7k Views 2 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.
  • S Offline
    S Offline
    SGaist
    Lifetime Qt Champion
    wrote on 29 Jan 2016, 10:34 last edited by
    #21

    That's because you don't have the Qt sources installed. Use maintenancetool to download them.

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

    T C 2 Replies Last reply 30 Jan 2016, 16:17
    1
    • S SGaist
      29 Jan 2016, 10:34

      That's because you don't have the Qt sources installed. Use maintenancetool to download them.

      T Offline
      T Offline
      Tas-sos
      wrote on 30 Jan 2016, 16:17 last edited by
      #22

      @SGaist
      Unbelievable though it was in front of me I had no idea about the "maintenancetool". I am inexperienced with using Qt not know so much about this, but I hope now to learn.

      I ran as you said the "MaintenanceTool" located in the "Qt" folder and i installed the "sources".
      Then I have what I needed! :D

      The guide now is satisfactory and effective. ;)

      Simply the guide says this path:

      cd $QTDIR/qtbase/src/plugins/sqldrivers/mysql
      

      to me is this:

      /home/myuser/Qt/5.4/Src/qtbase/src/plugins/sqldrivers/mysql
      

      Then because I have and version "Qt4" this command:

      qmake "INCLUDEPATH+=/usr/local/include" "LIBS+=-L/usr/local/lib -lmysqlclient_r" mysql.pro
      

      i run in this way:

      /home/myuser/Qt/5.4/gcc/bin/qmake "INCLUDEPATH+=/usr/local/include" "LIBS+=-L/usr/local/lib -lmysqlclient_r" mysql.pro
      

      All now work perfectly! I'm very happy about that! I Struggled a lot with this issue and does not need nor expecting.
      Thank you very very much my friends! I am indebted to your with your efficient and fast help!

      THANK YOU!

      C G 2 Replies Last reply 12 Aug 2017, 10:13
      0
      • T Tas-sos
        30 Jan 2016, 16:17

        @SGaist
        Unbelievable though it was in front of me I had no idea about the "maintenancetool". I am inexperienced with using Qt not know so much about this, but I hope now to learn.

        I ran as you said the "MaintenanceTool" located in the "Qt" folder and i installed the "sources".
        Then I have what I needed! :D

        The guide now is satisfactory and effective. ;)

        Simply the guide says this path:

        cd $QTDIR/qtbase/src/plugins/sqldrivers/mysql
        

        to me is this:

        /home/myuser/Qt/5.4/Src/qtbase/src/plugins/sqldrivers/mysql
        

        Then because I have and version "Qt4" this command:

        qmake "INCLUDEPATH+=/usr/local/include" "LIBS+=-L/usr/local/lib -lmysqlclient_r" mysql.pro
        

        i run in this way:

        /home/myuser/Qt/5.4/gcc/bin/qmake "INCLUDEPATH+=/usr/local/include" "LIBS+=-L/usr/local/lib -lmysqlclient_r" mysql.pro
        

        All now work perfectly! I'm very happy about that! I Struggled a lot with this issue and does not need nor expecting.
        Thank you very very much my friends! I am indebted to your with your efficient and fast help!

        THANK YOU!

        C Offline
        C Offline
        chawila
        wrote on 12 Aug 2017, 10:13 last edited by
        #23
        This post is deleted!
        1 Reply Last reply
        0
        • S SGaist
          29 Jan 2016, 10:34

          That's because you don't have the Qt sources installed. Use maintenancetool to download them.

          C Offline
          C Offline
          chawila
          wrote on 12 Aug 2017, 11:11 last edited by
          #24

          @SGaist said in QSqlDatabase: QMYSQL driver not loaded:

          That's because you don't have the Qt sources installed. Use maintenancetool to download them.

          Can someone tell please me what are QT sources..

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 12 Aug 2017, 22:25 last edited by SGaist
            #25

            Hi,

            As silly as it may sound: that's the sources of the Qt library.

            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
            • S SGaist
              27 Jan 2016, 08:03

              Can you run ldd on Qt's MySQL plugin ?

              C Offline
              C Offline
              chawila
              wrote on 14 Aug 2017, 13:39 last edited by
              #26
              This post is deleted!
              1 Reply Last reply
              0
              • T Tas-sos
                30 Jan 2016, 16:17

                @SGaist
                Unbelievable though it was in front of me I had no idea about the "maintenancetool". I am inexperienced with using Qt not know so much about this, but I hope now to learn.

                I ran as you said the "MaintenanceTool" located in the "Qt" folder and i installed the "sources".
                Then I have what I needed! :D

                The guide now is satisfactory and effective. ;)

                Simply the guide says this path:

                cd $QTDIR/qtbase/src/plugins/sqldrivers/mysql
                

                to me is this:

                /home/myuser/Qt/5.4/Src/qtbase/src/plugins/sqldrivers/mysql
                

                Then because I have and version "Qt4" this command:

                qmake "INCLUDEPATH+=/usr/local/include" "LIBS+=-L/usr/local/lib -lmysqlclient_r" mysql.pro
                

                i run in this way:

                /home/myuser/Qt/5.4/gcc/bin/qmake "INCLUDEPATH+=/usr/local/include" "LIBS+=-L/usr/local/lib -lmysqlclient_r" mysql.pro
                

                All now work perfectly! I'm very happy about that! I Struggled a lot with this issue and does not need nor expecting.
                Thank you very very much my friends! I am indebted to your with your efficient and fast help!

                THANK YOU!

                G Offline
                G Offline
                Gualtix
                wrote on 22 May 2019, 00:01 last edited by Gualtix
                #27

                @SGaist @Tas-sos Im just Right where you are, usgin make... put i have this error:
                'MySql Lib is Not Defined'

                0_1558483350957_f0fa2c95-6be7-4055-8355-c23fad355ed9-image.png

                Help Please!!!

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 22 May 2019, 06:48 last edited by
                  #28

                  @Gualtix Hi and welcome to devnet, you are not following the current documented procedure.

                  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
                  1

                  • Login

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