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. MySQL Plugins for Qt5.15.0
QtWS25 Last Chance

MySQL Plugins for Qt5.15.0

Scheduled Pinned Locked Moved Unsolved General and Desktop
12 Posts 3 Posters 1.1k 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.
  • SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on last edited by
    #1

    Are there any mysql plugins for Qt 5.15.0 ?

    I have them for Qt 5.14.2.

    Kind Regards,
    Sy

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Please search the forum. This question or one of its variants comes almost every week.
      Oracle has changed its licensing so currently the pre-built binaries do not ship with the plugin pre-built anymore. You have to build it yourself. The instructions can be found in the Qt documentation here. Depending on the license you want to use, you should go with MariaDB.

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

      SPlattenS 1 Reply Last reply
      2
      • SGaistS SGaist

        Hi,

        Please search the forum. This question or one of its variants comes almost every week.
        Oracle has changed its licensing so currently the pre-built binaries do not ship with the plugin pre-built anymore. You have to build it yourself. The instructions can be found in the Qt documentation here. Depending on the license you want to use, you should go with MariaDB.

        SPlattenS Offline
        SPlattenS Offline
        SPlatten
        wrote on last edited by
        #3

        @SGaist , I got at far as:

        make sub-mysql
        

        Then ran into problems. My sqldrivers folder:

        ~/Qt/5.15.0/Src/qtbase/src/plugins/sqldrivers
        

        Contains:

        total 240
        -rw-r--r--   1 simonplatten  staff  42994  9 Nov 12:45 Makefile
        -rw-r--r--   1 simonplatten  staff    233 11 May  2020 README
        -rw-r--r--   1 simonplatten  staff  13809  9 Nov 12:45 config.cache
        -rw-r--r--   1 simonplatten  staff  13962  9 Nov 12:45 config.log
        -rw-r--r--   1 simonplatten  staff     24  9 Nov 12:45 config.opt
        -rw-r--r--   1 simonplatten  staff    477  9 Nov 12:45 config.summary
        drwxr-xr-x   6 simonplatten  staff    192  9 Nov 12:45 config.tests
        -rw-r--r--   1 simonplatten  staff   8384 11 May  2020 configure.json
        -rw-r--r--   1 simonplatten  staff   2905 11 May  2020 configure.pri
        drwxr-xr-x   8 simonplatten  staff    256  2 Jul 06:05 db2
        drwxr-xr-x   7 simonplatten  staff    224  2 Jul 06:05 ibase
        drwxr-xr-x   3 simonplatten  staff     96  9 Nov 12:46 lib
        drwxr-xr-x   4 simonplatten  staff    128  9 Nov 12:46 mkspecs
        drwxr-xr-x   8 simonplatten  staff    256  2 Jul 06:05 mysql
        drwxr-xr-x   8 simonplatten  staff    256  2 Jul 06:05 oci
        drwxr-xr-x   8 simonplatten  staff    256  2 Jul 06:05 odbc
        drwxr-xr-x   3 simonplatten  staff     96  9 Nov 12:46 plugins
        drwxr-xr-x   8 simonplatten  staff    256  2 Jul 06:05 psql
        -rw-r--r--   1 simonplatten  staff    224 11 May  2020 qsqldriverbase.pri
        -rw-r--r--   1 simonplatten  staff      0  9 Nov 12:45 qtsqldrivers-config.h
        -rw-r--r--   1 simonplatten  staff    338  9 Nov 12:45 qtsqldrivers-config.pri
        -rw-r--r--   1 simonplatten  staff    318  9 Nov 12:45 qtsqldrivers-config_p.h
        -rw-r--r--   1 simonplatten  staff    505 11 May  2020 sqldrivers.pro
        drwxr-xr-x  12 simonplatten  staff    384  9 Nov 12:47 sqlite
        drwxr-xr-x   8 simonplatten  staff    256  2 Jul 06:05 sqlite2
        drwxr-xr-x   8 simonplatten  staff    256  2 Jul 06:05 tds
        

        It doesn't contain sub-mysql.

        Kind Regards,
        Sy

        jsulmJ 1 Reply Last reply
        0
        • SPlattenS SPlatten

          @SGaist , I got at far as:

          make sub-mysql
          

          Then ran into problems. My sqldrivers folder:

          ~/Qt/5.15.0/Src/qtbase/src/plugins/sqldrivers
          

          Contains:

          total 240
          -rw-r--r--   1 simonplatten  staff  42994  9 Nov 12:45 Makefile
          -rw-r--r--   1 simonplatten  staff    233 11 May  2020 README
          -rw-r--r--   1 simonplatten  staff  13809  9 Nov 12:45 config.cache
          -rw-r--r--   1 simonplatten  staff  13962  9 Nov 12:45 config.log
          -rw-r--r--   1 simonplatten  staff     24  9 Nov 12:45 config.opt
          -rw-r--r--   1 simonplatten  staff    477  9 Nov 12:45 config.summary
          drwxr-xr-x   6 simonplatten  staff    192  9 Nov 12:45 config.tests
          -rw-r--r--   1 simonplatten  staff   8384 11 May  2020 configure.json
          -rw-r--r--   1 simonplatten  staff   2905 11 May  2020 configure.pri
          drwxr-xr-x   8 simonplatten  staff    256  2 Jul 06:05 db2
          drwxr-xr-x   7 simonplatten  staff    224  2 Jul 06:05 ibase
          drwxr-xr-x   3 simonplatten  staff     96  9 Nov 12:46 lib
          drwxr-xr-x   4 simonplatten  staff    128  9 Nov 12:46 mkspecs
          drwxr-xr-x   8 simonplatten  staff    256  2 Jul 06:05 mysql
          drwxr-xr-x   8 simonplatten  staff    256  2 Jul 06:05 oci
          drwxr-xr-x   8 simonplatten  staff    256  2 Jul 06:05 odbc
          drwxr-xr-x   3 simonplatten  staff     96  9 Nov 12:46 plugins
          drwxr-xr-x   8 simonplatten  staff    256  2 Jul 06:05 psql
          -rw-r--r--   1 simonplatten  staff    224 11 May  2020 qsqldriverbase.pri
          -rw-r--r--   1 simonplatten  staff      0  9 Nov 12:45 qtsqldrivers-config.h
          -rw-r--r--   1 simonplatten  staff    338  9 Nov 12:45 qtsqldrivers-config.pri
          -rw-r--r--   1 simonplatten  staff    318  9 Nov 12:45 qtsqldrivers-config_p.h
          -rw-r--r--   1 simonplatten  staff    505 11 May  2020 sqldrivers.pro
          drwxr-xr-x  12 simonplatten  staff    384  9 Nov 12:47 sqlite
          drwxr-xr-x   8 simonplatten  staff    256  2 Jul 06:05 sqlite2
          drwxr-xr-x   8 simonplatten  staff    256  2 Jul 06:05 tds
          

          It doesn't contain sub-mysql.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @SPlatten said in MySQL Plugins for Qt5.15.0:

          It doesn't contain sub-mysql

          sub-mysql is a build target in the Makefile

          "Then ran into problems" - what problems?
          Did it compile?
          Did you run "make install"?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          SPlattenS 1 Reply Last reply
          0
          • jsulmJ jsulm

            @SPlatten said in MySQL Plugins for Qt5.15.0:

            It doesn't contain sub-mysql

            sub-mysql is a build target in the Makefile

            "Then ran into problems" - what problems?
            Did it compile?
            Did you run "make install"?

            SPlattenS Offline
            SPlattenS Offline
            SPlatten
            wrote on last edited by
            #5

            @jsulm , I followed the instructions on that link, when I type:

            make sub-mysql
            

            The response is:

            make: *** No rule to make target `sub-mysql'.  Stop.
            

            Kind Regards,
            Sy

            jsulmJ 1 Reply Last reply
            0
            • SPlattenS SPlatten

              @jsulm , I followed the instructions on that link, when I type:

              make sub-mysql
              

              The response is:

              make: *** No rule to make target `sub-mysql'.  Stop.
              
              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @SPlatten So, you did this (adjusted to your environment):

              cd $QTDIR/qtbase/src/plugins/sqldrivers
              qmake -- MYSQL_PREFIX=/usr/local
              make sub-mysql
              

              ?

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              SPlattenS 1 Reply Last reply
              0
              • jsulmJ jsulm

                @SPlatten So, you did this (adjusted to your environment):

                cd $QTDIR/qtbase/src/plugins/sqldrivers
                qmake -- MYSQL_PREFIX=/usr/local
                make sub-mysql
                

                ?

                SPlattenS Offline
                SPlattenS Offline
                SPlatten
                wrote on last edited by
                #7

                @jsulm , Yes

                Kind Regards,
                Sy

                jsulmJ 1 Reply Last reply
                0
                • SPlattenS SPlatten

                  @jsulm , Yes

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @SPlatten What was the qmake output?

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  SPlattenS 1 Reply Last reply
                  0
                  • jsulmJ jsulm

                    @SPlatten What was the qmake output?

                    SPlattenS Offline
                    SPlattenS Offline
                    SPlatten
                    wrote on last edited by SPlatten
                    #9

                    @jsulm

                    Running configuration tests...
                    Done running configuration tests.
                    
                    Configure summary:
                    
                    Qt Sql Drivers:
                      DB2 (IBM) .............................. no
                      InterBase .............................. no
                      MySql .................................. no
                      OCI (Oracle) ........................... no
                      ODBC ................................... no
                      PostgreSQL ............................. no
                      SQLite2 ................................ no
                      SQLite ................................. yes
                        Using system provided SQLite ......... no
                      TDS (Sybase) ........................... no
                    
                    Qt is now configured for building. Just run 'make'.
                    Once everything is built, you must run 'make install'.
                    Qt will be installed into '/Users/simonplatten/Qt/5.15.0/clang_64'.
                    
                    Prior to reconfiguration, make sure you remove any leftovers from
                    the previous build.
                    

                    I went through this process for Qt5.14.2 and built ok.

                    Kind Regards,
                    Sy

                    jsulmJ 1 Reply Last reply
                    0
                    • SPlattenS SPlatten

                      @jsulm

                      Running configuration tests...
                      Done running configuration tests.
                      
                      Configure summary:
                      
                      Qt Sql Drivers:
                        DB2 (IBM) .............................. no
                        InterBase .............................. no
                        MySql .................................. no
                        OCI (Oracle) ........................... no
                        ODBC ................................... no
                        PostgreSQL ............................. no
                        SQLite2 ................................ no
                        SQLite ................................. yes
                          Using system provided SQLite ......... no
                        TDS (Sybase) ........................... no
                      
                      Qt is now configured for building. Just run 'make'.
                      Once everything is built, you must run 'make install'.
                      Qt will be installed into '/Users/simonplatten/Qt/5.15.0/clang_64'.
                      
                      Prior to reconfiguration, make sure you remove any leftovers from
                      the previous build.
                      

                      I went through this process for Qt5.14.2 and built ok.

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @SPlatten said in MySQL Plugins for Qt5.15.0:

                      MySql .................................. no

                      As you can see MySql was not enabled. Check the config.log file for details (probably MySQL client library/header were not found).

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      SPlattenS 1 Reply Last reply
                      3
                      • jsulmJ jsulm

                        @SPlatten said in MySQL Plugins for Qt5.15.0:

                        MySql .................................. no

                        As you can see MySql was not enabled. Check the config.log file for details (probably MySQL client library/header were not found).

                        SPlattenS Offline
                        SPlattenS Offline
                        SPlatten
                        wrote on last edited by SPlatten
                        #11

                        @jsulm I know I struggled with this before, and unfortunately I didn't keep notes which is very unlike me, usually I keep very detailed notes...but I can see that I installed MariaDB via Homebrew, this creates a Homebrew folder in:

                        /usr/local/Homebrew
                        

                        MariaDB appears to be installed in:

                        lrwxr-xr-x  1 simonplatten  admin  29  9 Nov 12:52 mysql-client -> ../Cellar/mysql-client/8.0.22
                        lrwxr-xr-x  1 simonplatten  admin  29  9 Nov 12:52 mysql-client@8.0 -> ../Cellar/mysql-client/8.0.22
                        

                        Found this on my search for a solution, I must be getting old:
                        https://mariadb.com/kb/en/mariadb-set-up-for-qt-development-on-macos-catalina/

                        and more helpful:
                        https://forum.qt.io/topic/116526/set-up-mariadb-library-file-location-programmatically/57

                        Kind Regards,
                        Sy

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          Do not forget to properly clean before retrying your build as explained in the doc otherwise the cache will kick in and you'll stay in the same situation.

                          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