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 can't connect on MacBook
Forum Updated to NodeBB v4.3 + New Features

Mysql can't connect on MacBook

Scheduled Pinned Locked Moved Unsolved General and Desktop
65 Posts 6 Posters 7.4k 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #26

    Did you even try to read the related Qt's documentation ?

    It's explained there.
    There are also numerous thread on this forum about that subject.

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

    E 1 Reply Last reply
    1
    • SGaistS SGaist

      Did you even try to read the related Qt's documentation ?

      It's explained there.
      There are also numerous thread on this forum about that subject.

      E Offline
      E Offline
      Eternus
      wrote on last edited by Eternus
      #27

      @SGaist said in Mysql can't connect on MacBook:

      documentation

      i try this : https://forum.qt.io/topic/106565/mysql-qt-create-plugin-mysql-for-qt-on-mac

      Then, we cd to mysql folder (folder inside sqldrivers) and make plugin through 2 commands
      qmake
      make install

      if i qmake and make install i dont have libsqlmysql.dylib in file sqldrivers i dont know why ..Screenshot 2020-08-25 at 11.51.03.png

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

        And what about following the documentation I linked ?

        Are you sure you are using the correct qmake executable ?
        Did you check the qmake output ?
        Did you check the make output ?

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

        E 1 Reply Last reply
        2
        • SGaistS SGaist

          And what about following the documentation I linked ?

          Are you sure you are using the correct qmake executable ?
          Did you check the qmake output ?
          Did you check the make output ?

          E Offline
          E Offline
          Eternus
          wrote on last edited by
          #29

          @SGaist i do this:
          https://doc.qt.io/qt-5/sql-driver.html

          cd $QTDIR/qtbase/src/plugins/sqldrivers -- i need write full path
          qmake -- MYSQL_PREFIX=/usr/local - this working..
          i stopped on this step : make sub-mysql

          1 Reply Last reply
          0
          • Christian EhrlicherC Offline
            Christian EhrlicherC Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on last edited by
            #30

            @Eternus said in Mysql can't connect on MacBook:

            this working..

            Please remove all generated files (as explained in the documentation) and post the output of this command.

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            E 1 Reply Last reply
            0
            • Christian EhrlicherC Christian Ehrlicher

              @Eternus said in Mysql can't connect on MacBook:

              this working..

              Please remove all generated files (as explained in the documentation) and post the output of this command.

              E Offline
              E Offline
              Eternus
              wrote on last edited by
              #31

              @Christian-Ehrlicher said in Mysql can't connect on MacBook:

              working..

              Please remove all generated files (as explained in the documentation) and post the output of this

              how ?? i cant find in documentation

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

                By deleting the files that have been generated in the folder you are in.

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

                E 1 Reply Last reply
                0
                • SGaistS SGaist

                  By deleting the files that have been generated in the folder you are in.

                  E Offline
                  E Offline
                  Eternus
                  wrote on last edited by
                  #33

                  @SGaist have you mean all in sqldrivers ?

                  jsulmJ 1 Reply Last reply
                  0
                  • E Eternus

                    @SGaist have you mean all in sqldrivers ?

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

                    @Eternus In the build directory, $QTDIR/qtbase/src/plugins/sqldrivers in your case.
                    This is now a good example why it is way better to use out of source builds...

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

                    E 1 Reply Last reply
                    0
                    • jsulmJ jsulm

                      @Eternus In the build directory, $QTDIR/qtbase/src/plugins/sqldrivers in your case.
                      This is now a good example why it is way better to use out of source builds...

                      E Offline
                      E Offline
                      Eternus
                      wrote on last edited by Eternus
                      #35

                      @jsulm i deleted all files and still have same error
                      4eccc605-bee3-4f0d-abb5-1e4a4520fcd5-image.png https://ddgobkiprc33d.cloudfront.net/e229edb5-5f7b-4d09-b351-f42b5aa9c97b.png

                      documentation says me delete config i deleted comfig and its same..

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

                        Look into config.tests to see what is happening.

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

                        E 1 Reply Last reply
                        0
                        • SGaistS SGaist

                          Look into config.tests to see what is happening.

                          E Offline
                          E Offline
                          Eternus
                          wrote on last edited by
                          #37

                          @SGaist Screenshot 2020-08-28 at 21.37.23.png

                          this is config for mysql what there please ?

                          1 Reply Last reply
                          0
                          • Christian EhrlicherC Offline
                            Christian EhrlicherC Offline
                            Christian Ehrlicher
                            Lifetime Qt Champion
                            wrote on last edited by
                            #38

                            @Eternus said in Mysql can't connect on MacBook:

                            this is config for mysql what there please ?

                            You should take a look at the config.log as described in the documentation

                            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                            Visit the Qt Academy at https://academy.qt.io/catalog

                            E 1 Reply Last reply
                            0
                            • Christian EhrlicherC Christian Ehrlicher

                              @Eternus said in Mysql can't connect on MacBook:

                              this is config for mysql what there please ?

                              You should take a look at the config.log as described in the documentation

                              E Offline
                              E Offline
                              Eternus
                              wrote on last edited by
                              #39

                              @Christian-Ehrlicher
                              i cant find in documentation

                              1 Reply Last reply
                              -1
                              • Christian EhrlicherC Offline
                                Christian EhrlicherC Offline
                                Christian Ehrlicher
                                Lifetime Qt Champion
                                wrote on last edited by
                                #40

                                @Eternus said in Mysql can't connect on MacBook:

                                i cant find in documentation

                                "If something goes wrong and you want qmake to recheck your available drivers, you must remove config.cache in <QTDIR>/qtbase/src/plugins/sqldrivers - otherwise qmake will not search for the available drivers again. If you encounter an error during the qmake stage, open config.log to see what went wrong."

                                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                                Visit the Qt Academy at https://academy.qt.io/catalog

                                E 1 Reply Last reply
                                0
                                • Christian EhrlicherC Christian Ehrlicher

                                  @Eternus said in Mysql can't connect on MacBook:

                                  i cant find in documentation

                                  "If something goes wrong and you want qmake to recheck your available drivers, you must remove config.cache in <QTDIR>/qtbase/src/plugins/sqldrivers - otherwise qmake will not search for the available drivers again. If you encounter an error during the qmake stage, open config.log to see what went wrong."

                                  E Offline
                                  E Offline
                                  Eternus
                                  wrote on last edited by Eternus
                                  #41

                                  @Christian-Ehrlicher

                                  => source failed condition 'config.win32'.
                                  Trying source 1 (type sybaseEnv) of library tds ...

                                  • cd /Users/macbook/Qt/5.13.2/Src/qtbase/src/plugins/sqldrivers/config.tests/tds && /usr/local/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" 'QMAKE_USE += tds' 'QMAKE_LIBS_TDS = -lsybdb' /Users/macbook/Qt/5.13.2/Src/qtbase/src/plugins/sqldrivers/config.tests/tds
                                  • cd /Users/macbook/Qt/5.13.2/Src/qtbase/src/plugins/sqldrivers/config.tests/tds && MAKEFLAGS= make

                                  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -O2 -std=gnu++11 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.13 -w -fPIC -I. -I/usr/local/Cellar/qt/5.15.0/mkspecs/macx-clang -o main.o main.cpp
                                  main.cpp:2:10: fatal error: 'sybfront.h' file not found
                                  #include <sybfront.h>
                                  ^~~~~~~~~~~~
                                  1 error generated.
                                  make: *** [main.o] Error 1
                                  => source failed verification.
                                  test config.sqldrivers.libraries.tds FAILED

                                  this is my config.....

                                  but I found something else... In /usr/local/Cellar/qt/5.15.0/plugins/sqldrivers
                                  I have there libqsqlmysql.dylib its is it ? terminal says me he created here but If I change path I have same error....

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

                                    You are building Qt 5.13.2. You installed Qt 5.15.0 using brew.

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

                                    E 2 Replies Last reply
                                    0
                                    • SGaistS SGaist

                                      You are building Qt 5.13.2. You installed Qt 5.15.0 using brew.

                                      E Offline
                                      E Offline
                                      Eternus
                                      wrote on last edited by
                                      #43

                                      @SGaist if I not install qt with home-brew I have this :
                                      macbook@MacBook-Pro-uzivatela-Macbook sqldrivers % qmake -- MYSQL_PREFIX=/usr/local/mysql

                                      zsh: command not found: qmake
                                      macbook@MacBook-Pro-uzivatela-Macbook sqldrivers %

                                      1 Reply Last reply
                                      0
                                      • SGaistS SGaist

                                        You are building Qt 5.13.2. You installed Qt 5.15.0 using brew.

                                        E Offline
                                        E Offline
                                        Eternus
                                        wrote on last edited by
                                        #44

                                        @SGaist
                                        and if I do what I say its same with 5.15
                                        Trying source 1 (type sybaseEnv) of library tds ...

                                        • cd /Users/macbook/Qt/5.15.0/Src/qtbase/src/plugins/sqldrivers/config.tests/tds && /usr/local/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" 'QMAKE_USE += tds' 'QMAKE_LIBS_TDS = -lsybdb' /Users/macbook/Qt/5.15.0/Src/qtbase/src/plugins/sqldrivers/config.tests/tds
                                        • cd /Users/macbook/Qt/5.15.0/Src/qtbase/src/plugins/sqldrivers/config.tests/tds && MAKEFLAGS= make

                                        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -O2 -std=gnu++11 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.13 -w -fPIC -I. -I/usr/local/Cellar/qt/5.15.0/mkspecs/macx-clang -o main.o main.cpp
                                        main.cpp:2:10: fatal error: 'sybfront.h' file not found
                                        #include <sybfront.h>
                                        ^~~~~~~~~~~~
                                        1 error generated.
                                        make: *** [main.o] Error 1
                                        => source failed verification.
                                        test config.sqldrivers.libraries.tds FAILED

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

                                          Use the qmake executable that comes with the Qt version you installed. You can't just mix and match.

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

                                          E 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