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. Set-up MariaDB library file location programmatically?
Forum Updated to NodeBB v4.3 + New Features

Set-up MariaDB library file location programmatically?

Scheduled Pinned Locked Moved Solved General and Desktop
85 Posts 7 Posters 46.3k 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.
  • SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on last edited by SPlatten
    #7

    Thank you, do you have a link that details how?

    I'm downloading the MariaDB ODBC driver for MAC now or is this not the same?

    mariadb-connector-odbc-3.1.9-osx-x86_64

    Kind Regards,
    Sy

    jsulmJ 1 Reply Last reply
    0
    • SPlattenS SPlatten

      Thank you, do you have a link that details how?

      I'm downloading the MariaDB ODBC driver for MAC now or is this not the same?

      mariadb-connector-odbc-3.1.9-osx-x86_64

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

      @SPlatten https://doc.qt.io/qt-5/sql-driver.html
      https://stackoverflow.com/questions/6483523/qt-how-to-getcompile-mysql-driver

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

      1 Reply Last reply
      2
      • SPlattenS Offline
        SPlattenS Offline
        SPlatten
        wrote on last edited by SPlatten
        #9

        @jsulm , thank you.

        So already I'm struggling with the answer on: https://stackoverflow.com/questions/6483523/qt-how-to-getcompile-mysql-driver

        I cannot find the driver sources, my Qt path looks like this:

        /Users/simonplatten/qt/5.14.2/Src
        

        There is no plugins folder in there, the only plugins folder is:

        /Users/simonplatten/qt/5.14.2/clang_64/plugins
        

        That doesn't contain a mysql folder. I just did:

        sudo find / -name sqldrivers/mysql
        

        Nothing was found on my system.

        I've tried to follow the instructions on https://doc.qt.io/qt-5/sql-driver.html#qmysql
        I fall at the first hurdle, I don't have the environment variable QTDIR set and I think my installation of MariaDB is complicated by the fact it was installed using Homebrew.

        Kind Regards,
        Sy

        jsulmJ JonBJ 2 Replies Last reply
        0
        • SPlattenS SPlatten

          @jsulm , thank you.

          So already I'm struggling with the answer on: https://stackoverflow.com/questions/6483523/qt-how-to-getcompile-mysql-driver

          I cannot find the driver sources, my Qt path looks like this:

          /Users/simonplatten/qt/5.14.2/Src
          

          There is no plugins folder in there, the only plugins folder is:

          /Users/simonplatten/qt/5.14.2/clang_64/plugins
          

          That doesn't contain a mysql folder. I just did:

          sudo find / -name sqldrivers/mysql
          

          Nothing was found on my system.

          I've tried to follow the instructions on https://doc.qt.io/qt-5/sql-driver.html#qmysql
          I fall at the first hurdle, I don't have the environment variable QTDIR set and I think my installation of MariaDB is complicated by the fact it was installed using Homebrew.

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

          @SPlatten said in Set-up MariaDB library file location programmatically?:

          I cannot find the driver sources

          Did you install Qt sources?

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

          1 Reply Last reply
          0
          • SPlattenS Offline
            SPlattenS Offline
            SPlatten
            wrote on last edited by
            #11

            @jsulm, I don't think so, how do I do that?

            Kind Regards,
            Sy

            jsulmJ 1 Reply Last reply
            -1
            • SPlattenS SPlatten

              @jsulm, I don't think so, how do I do that?

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

              @SPlatten said in Set-up MariaDB library file location programmatically?:

              how do I do that?

              If you used online installer you can use Maintenance Tool...

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

              SPlattenS 1 Reply Last reply
              0
              • jsulmJ jsulm

                @SPlatten said in Set-up MariaDB library file location programmatically?:

                how do I do that?

                If you used online installer you can use Maintenance Tool...

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

                @jsulm , I did exactly that before posting my reply, I didn't see any option in it for source code.

                Kind Regards,
                Sy

                jsulmJ 1 Reply Last reply
                0
                • SPlattenS SPlatten

                  @jsulm , I did exactly that before posting my reply, I didn't see any option in it for source code.

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

                  @SPlatten https://www.qt.io/download-open-source

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

                  SPlattenS 1 Reply Last reply
                  0
                  • jsulmJ jsulm

                    @SPlatten https://www.qt.io/download-open-source

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

                    @jsulm , I'm confused now, the link posted is to the Open source page. What if I don't intend my application to be open source, once its completed I intend to purchase a license before distribution. Can I build a mySQL driver for Qt without open source?

                    Kind Regards,
                    Sy

                    jsulmJ 1 Reply Last reply
                    0
                    • SPlattenS SPlatten

                      @jsulm , I'm confused now, the link posted is to the Open source page. What if I don't intend my application to be open source, once its completed I intend to purchase a license before distribution. Can I build a mySQL driver for Qt without open source?

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

                      @SPlatten said in Set-up MariaDB library file location programmatically?:

                      once its completed I intend to purchase a license before distribution

                      I'm not sure QtCompany will agree with that.
                      You should contact them.

                      There are many ways to get the source code. For example here: https://download.qt.io/archive/qt/5.15/5.15.0/single/
                      Or using Git as described here: https://wiki.qt.io/Get_the_Source

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

                      1 Reply Last reply
                      1
                      • hskoglundH Offline
                        hskoglundH Offline
                        hskoglund
                        wrote on last edited by
                        #17

                        Hi, it might be easier if you use Qt's ODBC plugin (libqsqlodbc.dylib) together with the MariaDB Connector/ODBC

                        1 Reply Last reply
                        0
                        • SPlattenS Offline
                          SPlattenS Offline
                          SPlatten
                          wrote on last edited by
                          #18

                          @jsulm , if I'm developing it on my own system and no one else is involved or using it, how would this be against any license?

                          Kind Regards,
                          Sy

                          jsulmJ 1 Reply Last reply
                          0
                          • SPlattenS Offline
                            SPlattenS Offline
                            SPlatten
                            wrote on last edited by SPlatten
                            #19

                            @hskoglund , thank you, I'll look into it. It seems its available for just about every operating system except MAC.

                            Kind Regards,
                            Sy

                            1 Reply Last reply
                            0
                            • SPlattenS SPlatten

                              @jsulm , if I'm developing it on my own system and no one else is involved or using it, how would this be against any license?

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

                              @SPlatten I'm not a lawyer and not working for QtCompany (that's why I suggested to ask the company).
                              You say: you are now developing an app and you want to release it later as closed source. And you want to buy Qt license when you want to release the app. My point was: QtCompany could say that you actually need the commercial license from the beginning as you're developing a closed source application which is going to be distributed. I may be wrong here, but it is worth checking.

                              If you're not going to distribute your app then there is no issue.

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

                              SPlattenS J.HilkJ 2 Replies Last reply
                              2
                              • jsulmJ jsulm

                                @SPlatten I'm not a lawyer and not working for QtCompany (that's why I suggested to ask the company).
                                You say: you are now developing an app and you want to release it later as closed source. And you want to buy Qt license when you want to release the app. My point was: QtCompany could say that you actually need the commercial license from the beginning as you're developing a closed source application which is going to be distributed. I may be wrong here, but it is worth checking.

                                If you're not going to distribute your app then there is no issue.

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

                                @jsulm , thank you, I'll send Qt an email. Contacting Qt to ask such a question is easier said than done...How do I contact the appropriate person or department in Qt to ask?

                                https://www.qt.io/contact-qt-services-team

                                Query sent to Qt.

                                Kind Regards,
                                Sy

                                1 Reply Last reply
                                0
                                • SPlattenS SPlatten

                                  @jsulm , thank you.

                                  So already I'm struggling with the answer on: https://stackoverflow.com/questions/6483523/qt-how-to-getcompile-mysql-driver

                                  I cannot find the driver sources, my Qt path looks like this:

                                  /Users/simonplatten/qt/5.14.2/Src
                                  

                                  There is no plugins folder in there, the only plugins folder is:

                                  /Users/simonplatten/qt/5.14.2/clang_64/plugins
                                  

                                  That doesn't contain a mysql folder. I just did:

                                  sudo find / -name sqldrivers/mysql
                                  

                                  Nothing was found on my system.

                                  I've tried to follow the instructions on https://doc.qt.io/qt-5/sql-driver.html#qmysql
                                  I fall at the first hurdle, I don't have the environment variable QTDIR set and I think my installation of MariaDB is complicated by the fact it was installed using Homebrew.

                                  JonBJ Online
                                  JonBJ Online
                                  JonB
                                  wrote on last edited by JonB
                                  #22

                                  @SPlatten said in Set-up MariaDB library file location programmatically?:

                                  That doesn't contain a mysql folder. I just did:
                                  sudo find / -name sqldrivers/mysql

                                  Nothing was found on my system.

                                  I realize this is probably not your issue here, but I think you ought be aware, at least for future searches, that -name abc/def --- with that / --- will always return false, so you'll never find a match.

                                  On MacOS (I'm Ubuntu) I think you'll find you would have to use -path instead, plus you want a substring match, so you would need e.g.:

                                  sudo find / -path '*sqldrivers/mysql' -print
                                  

                                  P.S.
                                  Don't forget the -print which you didn't show you used, else find is remarkably silent ;-)

                                  1 Reply Last reply
                                  3
                                  • SPlattenS Offline
                                    SPlattenS Offline
                                    SPlatten
                                    wrote on last edited by
                                    #23

                                    @jsulm , thank you, just executed that and found:

                                    /System/Volumes/Data/Users/simonplatten/Qt/5.15.0/Src/qtbase/src/plugins/sqldrivers/mysql
                                    /System/Volumes/Data/Users/simonplatten/Qt/5.14.2/Src/qtbase/src/plugins/sqldrivers/mysql
                                    

                                    Kind Regards,
                                    Sy

                                    JonBJ 1 Reply Last reply
                                    0
                                    • jsulmJ jsulm

                                      @SPlatten I'm not a lawyer and not working for QtCompany (that's why I suggested to ask the company).
                                      You say: you are now developing an app and you want to release it later as closed source. And you want to buy Qt license when you want to release the app. My point was: QtCompany could say that you actually need the commercial license from the beginning as you're developing a closed source application which is going to be distributed. I may be wrong here, but it is worth checking.

                                      If you're not going to distribute your app then there is no issue.

                                      J.HilkJ Offline
                                      J.HilkJ Offline
                                      J.Hilk
                                      Moderators
                                      wrote on last edited by
                                      #24

                                      @jsulm said in Set-up MariaDB library file location programmatically?:

                                      My point was: QtCompany could say that you actually need the commercial license from the beginning as you're developing a closed source application which is going to be distributed. I may be wrong here, but it is worth checking.

                                      You do, or at least the QtC want you to, I had the issue when I wanted to open source a project that was previously made under QtLicence, slightly different but that exact topic came up.

                                      It's due to the yearly licensing scam scheme, would be no issue at all if it was a one purchase last for ever kind of deal


                                      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                                      Q: What's that?
                                      A: It's blue light.
                                      Q: What does it do?
                                      A: It turns blue.

                                      1 Reply Last reply
                                      0
                                      • SPlattenS SPlatten

                                        @jsulm , thank you, just executed that and found:

                                        /System/Volumes/Data/Users/simonplatten/Qt/5.15.0/Src/qtbase/src/plugins/sqldrivers/mysql
                                        /System/Volumes/Data/Users/simonplatten/Qt/5.14.2/Src/qtbase/src/plugins/sqldrivers/mysql
                                        
                                        JonBJ Online
                                        JonBJ Online
                                        JonB
                                        wrote on last edited by
                                        #25

                                        @SPlatten said in Set-up MariaDB library file location programmatically?:

                                        @jsulm , thank you, just executed that and found:

                                        @jsulm says it's a pleasure, on my behalf ;-)

                                        1 Reply Last reply
                                        1
                                        • SPlattenS Offline
                                          SPlattenS Offline
                                          SPlatten
                                          wrote on last edited by SPlatten
                                          #26

                                          I've been trying to follow: https://doc.qt.io/qt-5/sql-driver.html

                                          Lots of issues, for starters a terminal at:/Users/simonplatten/Qt/5.14.2/Src/qtbase/src/plugins/sqldrivers/mysql

                                          Executing qmake: ~/Qt/5.14.2/clang_64/bin/qmake -version

                                          Does not return the same I only get:

                                          QMake version 3.1
                                          Using Qt version 5.14.2 in /Users/simonplatten/Qt/5.14.2/clang_64/lib
                                          

                                          I could do with some help on how to turn the source into a driver.

                                          I got a little further:

                                          export QTDIR=/Users/simonplatten/Qt/5.14.2
                                          export QTDIRBIN=$QTDIR/clang_64/bin
                                          cd $QTDIR/Src/qtbase/src/plugins/sqldrivers 
                                          $QTDIRBIN/qmake -- MYSQL_PREFIX=/usr/local
                                          
                                          Running configuration tests...
                                          Checking for DB2 (IBM)... no
                                          Checking for InterBase... no
                                          Checking for MySQL... no
                                          Checking for OCI (Oracle)... no
                                          Checking for ODBC... no
                                          Checking for PostgreSQL... no
                                          Checking for SQLite (version 2)... no
                                          Checking for TDS (Sybase)... no
                                          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.14.2/clang_64'.
                                          
                                          Prior to reconfiguration, make sure you remove any leftovers from
                                          the previous build.
                                          

                                          I then ran "make", waited for it to complete. Some errors at the end:

                                          Project ERROR: Library 'freetype' is not defined.
                                          make[1]: *** [sub-minimal-make_first] Error 3
                                          make: *** [sub-platforms-make_first] Error 2
                                          

                                          Then run "make install".

                                          It would appear this has not built the driver as I still see in the Application Output:

                                          Warning:QSqlDatabase: QMYSQL driver not loaded
                                          Warning:QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7
                                          Info: L00000001:onFailure: db, failure: Driver not loaded Driver not loaded
                                          

                                          Why does it appear that its all set-up to build sqlite and NOT mysql ?

                                          Kind Regards,
                                          Sy

                                          SPlattenS 1 Reply Last reply
                                          0

                                          • Login

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