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

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.
  • S SGaist
    9 Nov 2020, 12:10

    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.

    S Offline
    S Offline
    SPlatten
    wrote on 9 Nov 2020, 13:10 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

    J 1 Reply Last reply 9 Nov 2020, 13:17
    0
    • S SPlatten
      9 Nov 2020, 13:10

      @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.

      J Online
      J Online
      jsulm
      Lifetime Qt Champion
      wrote on 9 Nov 2020, 13:17 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

      S 1 Reply Last reply 9 Nov 2020, 13:21
      0
      • J jsulm
        9 Nov 2020, 13:17

        @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"?

        S Offline
        S Offline
        SPlatten
        wrote on 9 Nov 2020, 13:21 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

        J 1 Reply Last reply 9 Nov 2020, 13:25
        0
        • S SPlatten
          9 Nov 2020, 13:21

          @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.
          
          J Online
          J Online
          jsulm
          Lifetime Qt Champion
          wrote on 9 Nov 2020, 13:25 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

          S 1 Reply Last reply 9 Nov 2020, 13:34
          0
          • J jsulm
            9 Nov 2020, 13:25

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

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

            ?

            S Offline
            S Offline
            SPlatten
            wrote on 9 Nov 2020, 13:34 last edited by
            #7

            @jsulm , Yes

            Kind Regards,
            Sy

            J 1 Reply Last reply 9 Nov 2020, 13:35
            0
            • S SPlatten
              9 Nov 2020, 13:34

              @jsulm , Yes

              J Online
              J Online
              jsulm
              Lifetime Qt Champion
              wrote on 9 Nov 2020, 13:35 last edited by
              #8

              @SPlatten What was the qmake output?

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

              S 1 Reply Last reply 9 Nov 2020, 13:38
              0
              • J jsulm
                9 Nov 2020, 13:35

                @SPlatten What was the qmake output?

                S Offline
                S Offline
                SPlatten
                wrote on 9 Nov 2020, 13:38 last edited by SPlatten 11 Sept 2020, 13:39
                #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

                J 1 Reply Last reply 9 Nov 2020, 13:41
                0
                • S SPlatten
                  9 Nov 2020, 13:38

                  @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.

                  J Online
                  J Online
                  jsulm
                  Lifetime Qt Champion
                  wrote on 9 Nov 2020, 13:41 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

                  S 1 Reply Last reply 9 Nov 2020, 13:48
                  3
                  • J jsulm
                    9 Nov 2020, 13:41

                    @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).

                    S Offline
                    S Offline
                    SPlatten
                    wrote on 9 Nov 2020, 13:48 last edited by SPlatten 11 Sept 2020, 14:20
                    #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
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 9 Nov 2020, 19:18 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

                      12/12

                      9 Nov 2020, 19:18

                      • Login

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