Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. QMYSQL mac os x yosemite
Forum Updated to NodeBB v4.3 + New Features

QMYSQL mac os x yosemite

Scheduled Pinned Locked Moved Installation and Deployment
11 Posts 2 Posters 3.0k 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
    #2

    Hi and welcome to devnet,

    You probably have the client libraries version 18 or upper and the MySQL plugin linked to a different version. The quickest way is to use otool to change the path from the MySQL plugin to point to your homebrew installed MySQL. Otherwise, you can re-build the plugin following Qt's documentation

    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
    • L Offline
      L Offline
      Levano
      wrote on last edited by
      #3

      Hi thank you to reply,
      I try that you meant like this:

      install_name_tool -change libqsqlmysql.dylib Qt/5.3/clang_64/plugins/sqldrivers/libqsqlmysql_debug.dylib /usr/local/lib/libmysqlclient.dylib

      The command didn't return any error, so it's seem like working....Ithought. But I got the same problem.

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

        What's the output of otool -L libqsqlmysql.dylib ?

        [edit: corrected typo]

        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
        • L Offline
          L Offline
          Levano
          wrote on last edited by
          #5

          @SGaist said:

          otool -L libqsqlmysql.lib

          didn't work:

          *error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: can't open file: libqsqlmysql.lib (No such file or directory)
          *

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

            Either run it in the same folder where the plugin can be found or give the full path to libqsqlmysql.dylib

            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
            • L Offline
              L Offline
              Levano
              wrote on last edited by
              #7

              @SGaist said:

              Either run it in the same folder where the plugin can be found or give the full path

              Qt/5.3/clang_64/plugins/sqldrivers/libqsqlmysql.dylib:
              libqsqlmysql.dylib (compatibility version 0.0.0, current version 0.0.0)
              /opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib (compatibility version 18.0.0, current version 18.0.0)
              /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
              /Users/ibrahimdie/Qt/5.3/clang_64/lib/QtSql.framework/Versions/5/QtSql (compatibility version 5.3.0, current version 5.3.1)
              /Users/ibrahimdie/Qt/5.3/clang_64/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.3.0, current version 5.3.1)
              /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0)
              /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)

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

                That looks fine. What error does QSqlDatabase return ?

                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
                • L Offline
                  L Offline
                  Levano
                  wrote on last edited by
                  #9

                  Actually I didn't have /opt/local/lib/mysql55 subdir, I created it, and I cp from /usr/local/lib/ the libmysqlclient.18.dyib on it (cf: line3). What line 2 means : C version 0.0.0, current version 0.0.0?

                  what error does QSqlDatabase return?
                  Here you are:
                  DriverType: QMYSQL
                  QSqlDatabase: QMYSQL driver not loaded
                  QSqlDatabase: available drivers: QSQLITE
                  Parameter 'DriverType' is invalid or RDB client library not available.

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

                    You should have updated /opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib to match your homebrew path

                    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
                    • L Offline
                      L Offline
                      Levano
                      wrote on last edited by
                      #11

                      Thank you very much. Everything works now.

                      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