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 driver detected but not loading on MacOS
Forum Updated to NodeBB v4.3 + New Features

MySQL driver detected but not loading on MacOS

Scheduled Pinned Locked Moved Unsolved General and Desktop
62 Posts 8 Posters 11.6k Views 3 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.
  • V Offline
    V Offline
    Vince2480
    wrote on 28 Jul 2021, 23:40 last edited by
    #1

    Hi, hope someone can answer this....

    I am trying to upgrade a MacOS desktop app I wrote back then under ver. 5.4. Surprisingly, that app is working still, even on Big Sur. My original Qt IDE installation has got damaged so I had to download a new one. I am using Desktop 5.9.9 clang 64, installed using the maintenance tool I downloaded.

    The libmysql plugins were included, so I assume they should just work, but for whatever reason, they're not loading.

    At this time, the compiler is giving me hundreds of warning messages of deprecated classes (definition of copy constructor and assignment) which I'm ignoring for now until I get the driver loaded. I don't know if this is impacting the sql connection strings I'm passing to QsqlDatabase.

    When I run the app, a message box comes up with
    ! Driver not loaded Driver not loaded.

    I set some debug output to see if indeed it was detected and what path.

    Library path:
    ("/Users/[USER]/Qt/5.9.9/clang_64/plugins", "/Users/[USER]/Developer/build-VDB-Desktop_Qt_5_9_9_clang_64bit-Debug/VDB.app/Contents/MacOS")
    Drivers:
    ("QSQLITE", "QMYSQL", "QMYSQL3", "QPSQL", "QPSQL7")
    QSqlDatabase: QMYSQL driver not loaded
    QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7
    

    I don't understand why the driver won't load.
    The app I built on Qt 5.4 DOES work using the driver that is installed in the Qt 5.4 directory. I did try to copy that driver into 5.9 but the version was not compatible.
    Can anyone help please?

    J 1 Reply Last reply 29 Jul 2021, 05:19
    0
    • V Vince2480
      28 Jul 2021, 23:40

      Hi, hope someone can answer this....

      I am trying to upgrade a MacOS desktop app I wrote back then under ver. 5.4. Surprisingly, that app is working still, even on Big Sur. My original Qt IDE installation has got damaged so I had to download a new one. I am using Desktop 5.9.9 clang 64, installed using the maintenance tool I downloaded.

      The libmysql plugins were included, so I assume they should just work, but for whatever reason, they're not loading.

      At this time, the compiler is giving me hundreds of warning messages of deprecated classes (definition of copy constructor and assignment) which I'm ignoring for now until I get the driver loaded. I don't know if this is impacting the sql connection strings I'm passing to QsqlDatabase.

      When I run the app, a message box comes up with
      ! Driver not loaded Driver not loaded.

      I set some debug output to see if indeed it was detected and what path.

      Library path:
      ("/Users/[USER]/Qt/5.9.9/clang_64/plugins", "/Users/[USER]/Developer/build-VDB-Desktop_Qt_5_9_9_clang_64bit-Debug/VDB.app/Contents/MacOS")
      Drivers:
      ("QSQLITE", "QMYSQL", "QMYSQL3", "QPSQL", "QPSQL7")
      QSqlDatabase: QMYSQL driver not loaded
      QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7
      

      I don't understand why the driver won't load.
      The app I built on Qt 5.4 DOES work using the driver that is installed in the Qt 5.4 directory. I did try to copy that driver into 5.9 but the version was not compatible.
      Can anyone help please?

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 29 Jul 2021, 05:19 last edited by
      #2

      @Vince2480 Set QT_DEBUG_PLUGINS before starting your app and check the output (you can also post it here). See https://doc.qt.io/qt-5/debug.html
      You should also use search function in this forum as exact same question is asked very often.

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

      1 Reply Last reply
      1
      • V Offline
        V Offline
        Vince2480
        wrote on 29 Jul 2021, 08:32 last edited by Vince2480
        #3

        @jsulm said in MySQL driver detected but not loading on MacOS:

        QT_DEBUG_PLUGINS

        Thanks jsulum for your response,
        QT_DEBUG_PLUGINS=1 has already been set in the .pro file and the output printed in the last 2 lines in my post...

        QSqlDatabase: QMYSQL driver not loaded
        QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7
        

        and I've searched the same question on this and other forums and haven't found any answers.

        A C J 3 Replies Last reply 29 Jul 2021, 08:36
        0
        • V Vince2480
          29 Jul 2021, 08:32

          @jsulm said in MySQL driver detected but not loading on MacOS:

          QT_DEBUG_PLUGINS

          Thanks jsulum for your response,
          QT_DEBUG_PLUGINS=1 has already been set in the .pro file and the output printed in the last 2 lines in my post...

          QSqlDatabase: QMYSQL driver not loaded
          QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7
          

          and I've searched the same question on this and other forums and haven't found any answers.

          A Offline
          A Offline
          artwaw
          wrote on 29 Jul 2021, 08:36 last edited by
          #4

          @Vince2480 The next logical step would be to make sure that mysql lib is on the library path when the program runs.

          For more information please re-read.

          Kind Regards,
          Artur

          1 Reply Last reply
          0
          • V Vince2480
            29 Jul 2021, 08:32

            @jsulm said in MySQL driver detected but not loading on MacOS:

            QT_DEBUG_PLUGINS

            Thanks jsulum for your response,
            QT_DEBUG_PLUGINS=1 has already been set in the .pro file and the output printed in the last 2 lines in my post...

            QSqlDatabase: QMYSQL driver not loaded
            QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7
            

            and I've searched the same question on this and other forums and haven't found any answers.

            C Offline
            C Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on 29 Jul 2021, 08:45 last edited by
            #5

            @Vince2480 said in MySQL driver detected but not loading on MacOS:

            QT_DEBUG_PLUGINS=1 has already been set in the .pro

            What should this help? QT_DEBUG_PLUGINS is an environment variable...

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

            1 Reply Last reply
            1
            • V Vince2480
              29 Jul 2021, 08:32

              @jsulm said in MySQL driver detected but not loading on MacOS:

              QT_DEBUG_PLUGINS

              Thanks jsulum for your response,
              QT_DEBUG_PLUGINS=1 has already been set in the .pro file and the output printed in the last 2 lines in my post...

              QSqlDatabase: QMYSQL driver not loaded
              QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7
              

              and I've searched the same question on this and other forums and haven't found any answers.

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 29 Jul 2021, 09:04 last edited by
              #6

              @Vince2480 said in MySQL driver detected but not loading on MacOS:

              QT_DEBUG_PLUGINS=1 has already been set in the .pro

              You don't set it in the pro file, you set it in terminal where you run the app or in Run settings of your project...

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

              1 Reply Last reply
              0
              • V Offline
                V Offline
                Vince2480
                wrote on 29 Jul 2021, 09:05 last edited by Vince2480
                #7

                artwaw, you mean the Qt plugins? because I have confirmed the app is attempting to load the plugins, unsuccessfully.

                jsulm, OK, I didn't know that, can I set that in Qt Creator IDE?

                J 1 Reply Last reply 29 Jul 2021, 09:10
                0
                • V Vince2480
                  29 Jul 2021, 09:05

                  artwaw, you mean the Qt plugins? because I have confirmed the app is attempting to load the plugins, unsuccessfully.

                  jsulm, OK, I didn't know that, can I set that in Qt Creator IDE?

                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 29 Jul 2021, 09:10 last edited by
                  #8

                  @Vince2480 said in MySQL driver detected but not loading on MacOS:

                  can I set that in Qt Creator IDE?

                  Yes, as mentioned in Run settings (Environment) - add QT_DEBUG_PLUGINS environment variable there with value 1

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

                  1 Reply Last reply
                  0
                  • V Offline
                    V Offline
                    Vince2480
                    wrote on 29 Jul 2021, 09:21 last edited by
                    #9

                    Thanks jsulm, I can see now it's looking for the files in /usr/local/mysql/lib that doesn't exist!

                    J 1 Reply Last reply 29 Jul 2021, 09:23
                    0
                    • V Vince2480
                      29 Jul 2021, 09:21

                      Thanks jsulm, I can see now it's looking for the files in /usr/local/mysql/lib that doesn't exist!

                      J Offline
                      J Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on 29 Jul 2021, 09:23 last edited by
                      #10

                      @Vince2480 said in MySQL driver detected but not loading on MacOS:

                      /usr/local/mysql/lib

                      Can you post whole output?

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

                      V 1 Reply Last reply 29 Jul 2021, 09:33
                      0
                      • J jsulm
                        29 Jul 2021, 09:23

                        @Vince2480 said in MySQL driver detected but not loading on MacOS:

                        /usr/local/mysql/lib

                        Can you post whole output?

                        V Offline
                        V Offline
                        Vince2480
                        wrote on 29 Jul 2021, 09:33 last edited by
                        #11

                        @jsulm
                        19:18:00: Starting /Users/vinceieraci/Developer/build-VDB-Desktop_Qt_5_9_9_clang_64bit-Debug/VDB.app/Contents/MacOS/VDB ...
                        QFactoryLoader::QFactoryLoader() checking directory path "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platforms" ...
                        QFactoryLoader::QFactoryLoader() looking at "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platforms/libqcocoa.dylib"
                        Found metadata in lib /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platforms/libqcocoa.dylib, metadata=
                        {
                        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                        "MetaData": {
                        "Keys": [
                        "cocoa"
                        ]
                        },
                        "className": "QCocoaIntegrationPlugin",
                        "debug": false,
                        "version": 329993
                        }

                        Got keys from plugin meta data ("cocoa")
                        QFactoryLoader::QFactoryLoader() looking at "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platforms/libqminimal.dylib"
                        Found metadata in lib /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platforms/libqminimal.dylib, metadata=
                        {
                        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                        "MetaData": {
                        "Keys": [
                        "minimal"
                        ]
                        },
                        "className": "QMinimalIntegrationPlugin",
                        "debug": false,
                        "version": 329993
                        }

                        Got keys from plugin meta data ("minimal")
                        QFactoryLoader::QFactoryLoader() looking at "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platforms/libqminimal_debug.dylib"
                        Found metadata in lib /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platforms/libqminimal_debug.dylib, metadata=
                        {
                        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                        "MetaData": {
                        "Keys": [
                        "minimal"
                        ]
                        },
                        "className": "QMinimalIntegrationPlugin",
                        "debug": true,
                        "version": 329993
                        }

                        Got keys from plugin meta data ("minimal")
                        QFactoryLoader::QFactoryLoader() looking at "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platforms/libqoffscreen.dylib"
                        Found metadata in lib /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platforms/libqoffscreen.dylib, metadata=
                        {
                        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                        "MetaData": {
                        "Keys": [
                        "offscreen"
                        ]
                        },
                        "className": "QOffscreenIntegrationPlugin",
                        "debug": false,
                        "version": 329993
                        }

                        Got keys from plugin meta data ("offscreen")
                        QFactoryLoader::QFactoryLoader() looking at "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platforms/libqoffscreen_debug.dylib"
                        Found metadata in lib /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platforms/libqoffscreen_debug.dylib, metadata=
                        {
                        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                        "MetaData": {
                        "Keys": [
                        "offscreen"
                        ]
                        },
                        "className": "QOffscreenIntegrationPlugin",
                        "debug": true,
                        "version": 329993
                        }

                        Got keys from plugin meta data ("offscreen")
                        QFactoryLoader::QFactoryLoader() checking directory path "/Users/vinceieraci/Developer/build-VDB-Desktop_Qt_5_9_9_clang_64bit-Debug/VDB.app/Contents/MacOS/platforms" ...
                        loaded library "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platforms/libqcocoa.dylib"
                        QFactoryLoader::QFactoryLoader() checking directory path "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platformthemes" ...
                        QFactoryLoader::QFactoryLoader() checking directory path "/Users/vinceieraci/Developer/build-VDB-Desktop_Qt_5_9_9_clang_64bit-Debug/VDB.app/Contents/MacOS/platformthemes" ...
                        QFactoryLoader::QFactoryLoader() checking directory path "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/styles" ...
                        QFactoryLoader::QFactoryLoader() checking directory path "/Users/vinceieraci/Developer/build-VDB-Desktop_Qt_5_9_9_clang_64bit-Debug/VDB.app/Contents/MacOS/styles" ...
                        loaded library "/System/Library/Frameworks/Carbon.framework/Carbon"
                        Library path:
                        ("/Users/vinceieraci/Qt/5.9.9/clang_64/plugins", "/Users/vinceieraci/Developer/build-VDB-Desktop_Qt_5_9_9_clang_64bit-Debug/VDB.app/Contents/MacOS")
                        Drivers:
                        QFactoryLoader::QFactoryLoader() checking directory path "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers" ...
                        QFactoryLoader::QFactoryLoader() looking at "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlite.dylib"
                        Found metadata in lib /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlite.dylib, metadata=
                        {
                        "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                        "MetaData": {
                        "Keys": [
                        "QSQLITE"
                        ]
                        },
                        "className": "QSQLiteDriverPlugin",
                        "debug": false,
                        "version": 329993
                        }

                        Got keys from plugin meta data ("QSQLITE")
                        QFactoryLoader::QFactoryLoader() looking at "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlite_debug.dylib"
                        Found metadata in lib /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlite_debug.dylib, metadata=
                        {
                        "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                        "MetaData": {
                        "Keys": [
                        "QSQLITE"
                        ]
                        },
                        "className": "QSQLiteDriverPlugin",
                        "debug": true,
                        "version": 329993
                        }

                        Got keys from plugin meta data ("QSQLITE")
                        QFactoryLoader::QFactoryLoader() looking at "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib"
                        Found metadata in lib /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib, metadata=
                        {
                        "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                        "MetaData": {
                        "Keys": [
                        "QMYSQL3",
                        "QMYSQL"
                        ]
                        },
                        "className": "QMYSQLDriverPlugin",
                        "debug": false,
                        "version": 329993
                        }

                        Got keys from plugin meta data ("QMYSQL3", "QMYSQL")
                        QFactoryLoader::QFactoryLoader() looking at "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql_debug.dylib"
                        Found metadata in lib /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql_debug.dylib, metadata=
                        {
                        "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                        "MetaData": {
                        "Keys": [
                        "QMYSQL3",
                        "QMYSQL"
                        ]
                        },
                        "className": "QMYSQLDriverPlugin",
                        "debug": true,
                        "version": 329993
                        }

                        Got keys from plugin meta data ("QMYSQL3", "QMYSQL")
                        QFactoryLoader::QFactoryLoader() looking at "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlpsql.dylib"
                        Found metadata in lib /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlpsql.dylib, metadata=
                        {
                        "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                        "MetaData": {
                        "Keys": [
                        "QPSQL7",
                        "QPSQL"
                        ]
                        },
                        "className": "QPSQLDriverPlugin",
                        "debug": false,
                        "version": 329993
                        }

                        Got keys from plugin meta data ("QPSQL7", "QPSQL")
                        QFactoryLoader::QFactoryLoader() looking at "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlpsql_debug.dylib"
                        Found metadata in lib /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlpsql_debug.dylib, metadata=
                        {
                        "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                        "MetaData": {
                        "Keys": [
                        "QPSQL7",
                        "QPSQL"
                        ]
                        },
                        "className": "QPSQLDriverPlugin",
                        "debug": true,
                        "version": 329993
                        }

                        Got keys from plugin meta data ("QPSQL7", "QPSQL")
                        QFactoryLoader::QFactoryLoader() checking directory path "/Users/vinceieraci/Developer/build-VDB-Desktop_Qt_5_9_9_clang_64bit-Debug/VDB.app/Contents/MacOS/sqldrivers" ...
                        ("QSQLITE", "QMYSQL", "QMYSQL3", "QPSQL", "QPSQL7")
                        Cannot load library /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib: (dlopen(/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib, 133): Library not loaded: /usr/local/mysql/lib/libmysqlclient.20.dylib
                        Referenced from: /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib
                        Reason: image not found)
                        QLibraryPrivate::loadPlugin failed on "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib" : "Cannot load library /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib: (dlopen(/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib, 133): Library not loaded: /usr/local/mysql/lib/libmysqlclient.20.dylib\n Referenced from: /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib\n Reason: image not found)"
                        QSqlDatabase: QMYSQL driver not loaded
                        QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7
                        db.open() next...:
                        db.open() ok:
                        lasterr().type() 1 title "Connection Error 1" text "Driver not loaded Driver not loaded"
                        QFactoryLoader::QFactoryLoader() checking directory path "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/iconengines" ...
                        QFactoryLoader::QFactoryLoader() looking at "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/iconengines/libqsvgicon.dylib"
                        Found metadata in lib /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/iconengines/libqsvgicon.dylib, metadata=
                        {
                        "IID": "org.qt-project.Qt.QIconEngineFactoryInterface",
                        "MetaData": {
                        "Keys": [
                        "svg",
                        "svgz",
                        "svg.gz"
                        ]
                        },
                        "className": "QSvgIconPlugin",
                        "debug": false,
                        "version": 329993
                        }

                        Got keys from plugin meta data ("svg", "svgz", "svg.gz")
                        QFactoryLoader::QFactoryLoader() looking at "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/iconengines/libqsvgicon_debug.dylib"
                        Found metadata in lib /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/iconengines/libqsvgicon_debug.dylib, metadata=
                        {
                        "IID": "org.qt-project.Qt.QIconEngineFactoryInterface",
                        "MetaData": {
                        "Keys": [
                        "svg",
                        "svgz",
                        "svg.gz"
                        ]
                        },
                        "className": "QSvgIconPlugin",
                        "debug": true,
                        "version": 329993
                        }

                        Got keys from plugin meta data ("svg", "svgz", "svg.gz")
                        QFactoryLoader::QFactoryLoader() checking directory path "/Users/vinceieraci/Developer/build-VDB-Desktop_Qt_5_9_9_clang_64bit-Debug/VDB.app/Contents/MacOS/iconengines" ...
                        QLibraryPrivate::unload succeeded on "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platforms/libqcocoa.dylib"
                        QLibraryPrivate::unload succeeded on "/System/Library/Frameworks/Carbon.framework/Carbon"
                        19:18:04: /Users/vinceieraci/Developer/build-VDB-Desktop_Qt_5_9_9_clang_64bit-Debug/VDB.app/Contents/MacOS/VDB exited with code 1

                        J 1 Reply Last reply 29 Jul 2021, 09:36
                        0
                        • V Vince2480
                          29 Jul 2021, 09:33

                          @jsulm
                          19:18:00: Starting /Users/vinceieraci/Developer/build-VDB-Desktop_Qt_5_9_9_clang_64bit-Debug/VDB.app/Contents/MacOS/VDB ...
                          QFactoryLoader::QFactoryLoader() checking directory path "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platforms" ...
                          QFactoryLoader::QFactoryLoader() looking at "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platforms/libqcocoa.dylib"
                          Found metadata in lib /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platforms/libqcocoa.dylib, metadata=
                          {
                          "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                          "MetaData": {
                          "Keys": [
                          "cocoa"
                          ]
                          },
                          "className": "QCocoaIntegrationPlugin",
                          "debug": false,
                          "version": 329993
                          }

                          Got keys from plugin meta data ("cocoa")
                          QFactoryLoader::QFactoryLoader() looking at "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platforms/libqminimal.dylib"
                          Found metadata in lib /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platforms/libqminimal.dylib, metadata=
                          {
                          "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                          "MetaData": {
                          "Keys": [
                          "minimal"
                          ]
                          },
                          "className": "QMinimalIntegrationPlugin",
                          "debug": false,
                          "version": 329993
                          }

                          Got keys from plugin meta data ("minimal")
                          QFactoryLoader::QFactoryLoader() looking at "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platforms/libqminimal_debug.dylib"
                          Found metadata in lib /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platforms/libqminimal_debug.dylib, metadata=
                          {
                          "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                          "MetaData": {
                          "Keys": [
                          "minimal"
                          ]
                          },
                          "className": "QMinimalIntegrationPlugin",
                          "debug": true,
                          "version": 329993
                          }

                          Got keys from plugin meta data ("minimal")
                          QFactoryLoader::QFactoryLoader() looking at "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platforms/libqoffscreen.dylib"
                          Found metadata in lib /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platforms/libqoffscreen.dylib, metadata=
                          {
                          "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                          "MetaData": {
                          "Keys": [
                          "offscreen"
                          ]
                          },
                          "className": "QOffscreenIntegrationPlugin",
                          "debug": false,
                          "version": 329993
                          }

                          Got keys from plugin meta data ("offscreen")
                          QFactoryLoader::QFactoryLoader() looking at "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platforms/libqoffscreen_debug.dylib"
                          Found metadata in lib /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platforms/libqoffscreen_debug.dylib, metadata=
                          {
                          "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                          "MetaData": {
                          "Keys": [
                          "offscreen"
                          ]
                          },
                          "className": "QOffscreenIntegrationPlugin",
                          "debug": true,
                          "version": 329993
                          }

                          Got keys from plugin meta data ("offscreen")
                          QFactoryLoader::QFactoryLoader() checking directory path "/Users/vinceieraci/Developer/build-VDB-Desktop_Qt_5_9_9_clang_64bit-Debug/VDB.app/Contents/MacOS/platforms" ...
                          loaded library "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platforms/libqcocoa.dylib"
                          QFactoryLoader::QFactoryLoader() checking directory path "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platformthemes" ...
                          QFactoryLoader::QFactoryLoader() checking directory path "/Users/vinceieraci/Developer/build-VDB-Desktop_Qt_5_9_9_clang_64bit-Debug/VDB.app/Contents/MacOS/platformthemes" ...
                          QFactoryLoader::QFactoryLoader() checking directory path "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/styles" ...
                          QFactoryLoader::QFactoryLoader() checking directory path "/Users/vinceieraci/Developer/build-VDB-Desktop_Qt_5_9_9_clang_64bit-Debug/VDB.app/Contents/MacOS/styles" ...
                          loaded library "/System/Library/Frameworks/Carbon.framework/Carbon"
                          Library path:
                          ("/Users/vinceieraci/Qt/5.9.9/clang_64/plugins", "/Users/vinceieraci/Developer/build-VDB-Desktop_Qt_5_9_9_clang_64bit-Debug/VDB.app/Contents/MacOS")
                          Drivers:
                          QFactoryLoader::QFactoryLoader() checking directory path "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers" ...
                          QFactoryLoader::QFactoryLoader() looking at "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlite.dylib"
                          Found metadata in lib /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlite.dylib, metadata=
                          {
                          "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                          "MetaData": {
                          "Keys": [
                          "QSQLITE"
                          ]
                          },
                          "className": "QSQLiteDriverPlugin",
                          "debug": false,
                          "version": 329993
                          }

                          Got keys from plugin meta data ("QSQLITE")
                          QFactoryLoader::QFactoryLoader() looking at "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlite_debug.dylib"
                          Found metadata in lib /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlite_debug.dylib, metadata=
                          {
                          "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                          "MetaData": {
                          "Keys": [
                          "QSQLITE"
                          ]
                          },
                          "className": "QSQLiteDriverPlugin",
                          "debug": true,
                          "version": 329993
                          }

                          Got keys from plugin meta data ("QSQLITE")
                          QFactoryLoader::QFactoryLoader() looking at "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib"
                          Found metadata in lib /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib, metadata=
                          {
                          "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                          "MetaData": {
                          "Keys": [
                          "QMYSQL3",
                          "QMYSQL"
                          ]
                          },
                          "className": "QMYSQLDriverPlugin",
                          "debug": false,
                          "version": 329993
                          }

                          Got keys from plugin meta data ("QMYSQL3", "QMYSQL")
                          QFactoryLoader::QFactoryLoader() looking at "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql_debug.dylib"
                          Found metadata in lib /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql_debug.dylib, metadata=
                          {
                          "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                          "MetaData": {
                          "Keys": [
                          "QMYSQL3",
                          "QMYSQL"
                          ]
                          },
                          "className": "QMYSQLDriverPlugin",
                          "debug": true,
                          "version": 329993
                          }

                          Got keys from plugin meta data ("QMYSQL3", "QMYSQL")
                          QFactoryLoader::QFactoryLoader() looking at "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlpsql.dylib"
                          Found metadata in lib /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlpsql.dylib, metadata=
                          {
                          "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                          "MetaData": {
                          "Keys": [
                          "QPSQL7",
                          "QPSQL"
                          ]
                          },
                          "className": "QPSQLDriverPlugin",
                          "debug": false,
                          "version": 329993
                          }

                          Got keys from plugin meta data ("QPSQL7", "QPSQL")
                          QFactoryLoader::QFactoryLoader() looking at "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlpsql_debug.dylib"
                          Found metadata in lib /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlpsql_debug.dylib, metadata=
                          {
                          "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                          "MetaData": {
                          "Keys": [
                          "QPSQL7",
                          "QPSQL"
                          ]
                          },
                          "className": "QPSQLDriverPlugin",
                          "debug": true,
                          "version": 329993
                          }

                          Got keys from plugin meta data ("QPSQL7", "QPSQL")
                          QFactoryLoader::QFactoryLoader() checking directory path "/Users/vinceieraci/Developer/build-VDB-Desktop_Qt_5_9_9_clang_64bit-Debug/VDB.app/Contents/MacOS/sqldrivers" ...
                          ("QSQLITE", "QMYSQL", "QMYSQL3", "QPSQL", "QPSQL7")
                          Cannot load library /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib: (dlopen(/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib, 133): Library not loaded: /usr/local/mysql/lib/libmysqlclient.20.dylib
                          Referenced from: /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib
                          Reason: image not found)
                          QLibraryPrivate::loadPlugin failed on "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib" : "Cannot load library /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib: (dlopen(/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib, 133): Library not loaded: /usr/local/mysql/lib/libmysqlclient.20.dylib\n Referenced from: /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib\n Reason: image not found)"
                          QSqlDatabase: QMYSQL driver not loaded
                          QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7
                          db.open() next...:
                          db.open() ok:
                          lasterr().type() 1 title "Connection Error 1" text "Driver not loaded Driver not loaded"
                          QFactoryLoader::QFactoryLoader() checking directory path "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/iconengines" ...
                          QFactoryLoader::QFactoryLoader() looking at "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/iconengines/libqsvgicon.dylib"
                          Found metadata in lib /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/iconengines/libqsvgicon.dylib, metadata=
                          {
                          "IID": "org.qt-project.Qt.QIconEngineFactoryInterface",
                          "MetaData": {
                          "Keys": [
                          "svg",
                          "svgz",
                          "svg.gz"
                          ]
                          },
                          "className": "QSvgIconPlugin",
                          "debug": false,
                          "version": 329993
                          }

                          Got keys from plugin meta data ("svg", "svgz", "svg.gz")
                          QFactoryLoader::QFactoryLoader() looking at "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/iconengines/libqsvgicon_debug.dylib"
                          Found metadata in lib /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/iconengines/libqsvgicon_debug.dylib, metadata=
                          {
                          "IID": "org.qt-project.Qt.QIconEngineFactoryInterface",
                          "MetaData": {
                          "Keys": [
                          "svg",
                          "svgz",
                          "svg.gz"
                          ]
                          },
                          "className": "QSvgIconPlugin",
                          "debug": true,
                          "version": 329993
                          }

                          Got keys from plugin meta data ("svg", "svgz", "svg.gz")
                          QFactoryLoader::QFactoryLoader() checking directory path "/Users/vinceieraci/Developer/build-VDB-Desktop_Qt_5_9_9_clang_64bit-Debug/VDB.app/Contents/MacOS/iconengines" ...
                          QLibraryPrivate::unload succeeded on "/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/platforms/libqcocoa.dylib"
                          QLibraryPrivate::unload succeeded on "/System/Library/Frameworks/Carbon.framework/Carbon"
                          19:18:04: /Users/vinceieraci/Developer/build-VDB-Desktop_Qt_5_9_9_clang_64bit-Debug/VDB.app/Contents/MacOS/VDB exited with code 1

                          J Offline
                          J Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on 29 Jul 2021, 09:36 last edited by
                          #12

                          @Vince2480 You could try to set LD_LIBRARY_PATH to point to folder containing libmysqlclient.20.dylib

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

                          V 1 Reply Last reply 29 Jul 2021, 09:46
                          0
                          • J jsulm
                            29 Jul 2021, 09:36

                            @Vince2480 You could try to set LD_LIBRARY_PATH to point to folder containing libmysqlclient.20.dylib

                            V Offline
                            V Offline
                            Vince2480
                            wrote on 29 Jul 2021, 09:46 last edited by
                            #13

                            @jsulm libmysqlclient.20.dylib is not on my system so does that means I need to install MySQL? I didn't do that for Qt5.4, has something changed between then and now?

                            J 1 Reply Last reply 29 Jul 2021, 10:36
                            0
                            • V Vince2480
                              29 Jul 2021, 09:46

                              @jsulm libmysqlclient.20.dylib is not on my system so does that means I need to install MySQL? I didn't do that for Qt5.4, has something changed between then and now?

                              J Offline
                              J Offline
                              jsulm
                              Lifetime Qt Champion
                              wrote on 29 Jul 2021, 10:36 last edited by jsulm
                              #14

                              @Vince2480 said in MySQL driver detected but not loading on MacOS:

                              install MySQL?

                              Not the server, only client.

                              "has something changed between then and now?" - yes, the MySQL license has changed (since Oracle owns MySQL). Because of that QtCompany does not include MySQL client lib anymore in the Qt builds it's providing.

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

                              V 1 Reply Last reply 29 Jul 2021, 11:02
                              0
                              • J jsulm
                                29 Jul 2021, 10:36

                                @Vince2480 said in MySQL driver detected but not loading on MacOS:

                                install MySQL?

                                Not the server, only client.

                                "has something changed between then and now?" - yes, the MySQL license has changed (since Oracle owns MySQL). Because of that QtCompany does not include MySQL client lib anymore in the Qt builds it's providing.

                                V Offline
                                V Offline
                                Vince2480
                                wrote on 29 Jul 2021, 11:02 last edited by Vince2480
                                #15

                                @jsulm OK, I see.

                                I installed

                                brew install mysql-client
                                

                                only libmysqlclient.21.dylib so I linked with libmysqlclient.20.dylib
                                but it's the wrong architecture.

                                Cannot load library /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib: (dlopen(/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib, 133): Library not loaded: /usr/local/mysql/lib/libmysqlclient.20.dylib
                                  Referenced from: /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib
                                  Reason: no suitable image found.  Did find:
                                	/opt/homebrew/Cellar/mysql-client/8.0.26/lib/libmysqlclient.20.dylib: mach-o, but wrong architecture
                                	/opt/homebrew/Cellar/mysql-client/8.0.26/lib/libmysqlclient.20.dylib: mach-o, but wrong architecture)
                                

                                I downloaded mysql-connector-c++ but that doesn't look viable.
                                Where do I find the required files?

                                J 1 Reply Last reply 29 Jul 2021, 11:07
                                0
                                • V Vince2480
                                  29 Jul 2021, 11:02

                                  @jsulm OK, I see.

                                  I installed

                                  brew install mysql-client
                                  

                                  only libmysqlclient.21.dylib so I linked with libmysqlclient.20.dylib
                                  but it's the wrong architecture.

                                  Cannot load library /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib: (dlopen(/Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib, 133): Library not loaded: /usr/local/mysql/lib/libmysqlclient.20.dylib
                                    Referenced from: /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib
                                    Reason: no suitable image found.  Did find:
                                  	/opt/homebrew/Cellar/mysql-client/8.0.26/lib/libmysqlclient.20.dylib: mach-o, but wrong architecture
                                  	/opt/homebrew/Cellar/mysql-client/8.0.26/lib/libmysqlclient.20.dylib: mach-o, but wrong architecture)
                                  

                                  I downloaded mysql-connector-c++ but that doesn't look viable.
                                  Where do I find the required files?

                                  J Offline
                                  J Offline
                                  jsulm
                                  Lifetime Qt Champion
                                  wrote on 29 Jul 2021, 11:07 last edited by
                                  #16

                                  @Vince2480 What does

                                  file /opt/homebrew/Cellar/mysql-client/8.0.26/lib/libmysqlclient.20.dylib
                                  

                                  and

                                  file /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib
                                  

                                  output?

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

                                  V 1 Reply Last reply 29 Jul 2021, 11:30
                                  0
                                  • J jsulm
                                    29 Jul 2021, 11:07

                                    @Vince2480 What does

                                    file /opt/homebrew/Cellar/mysql-client/8.0.26/lib/libmysqlclient.20.dylib
                                    

                                    and

                                    file /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib
                                    

                                    output?

                                    V Offline
                                    V Offline
                                    Vince2480
                                    wrote on 29 Jul 2021, 11:30 last edited by
                                    #17

                                    @jsulm Excuse my ignorance, I don't understand the question.

                                    JonBJ 1 Reply Last reply 29 Jul 2021, 11:31
                                    0
                                    • V Vince2480
                                      29 Jul 2021, 11:30

                                      @jsulm Excuse my ignorance, I don't understand the question.

                                      JonBJ Offline
                                      JonBJ Offline
                                      JonB
                                      wrote on 29 Jul 2021, 11:31 last edited by
                                      #18

                                      @Vince2480
                                      From a command prompt/terminal/shell, copy & paste exactly each of the two lines @jsulm typed, and paste back here what response you get.

                                      V 1 Reply Last reply 29 Jul 2021, 11:42
                                      0
                                      • JonBJ JonB
                                        29 Jul 2021, 11:31

                                        @Vince2480
                                        From a command prompt/terminal/shell, copy & paste exactly each of the two lines @jsulm typed, and paste back here what response you get.

                                        V Offline
                                        V Offline
                                        Vince2480
                                        wrote on 29 Jul 2021, 11:42 last edited by
                                        #19

                                        @JonB

                                        /opt/homebrew/Cellar/mysql-client/8.0.26/lib/libmysqlclient.20.dylib: Mach-O 64-bit dynamically linked shared library
                                        
                                        /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib: Mach-O 64-bit dynamically linked shared library x86_64
                                        
                                        J 1 Reply Last reply 29 Jul 2021, 11:50
                                        0
                                        • V Vince2480
                                          29 Jul 2021, 11:42

                                          @JonB

                                          /opt/homebrew/Cellar/mysql-client/8.0.26/lib/libmysqlclient.20.dylib: Mach-O 64-bit dynamically linked shared library
                                          
                                          /Users/vinceieraci/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib: Mach-O 64-bit dynamically linked shared library x86_64
                                          
                                          J Offline
                                          J Offline
                                          jsulm
                                          Lifetime Qt Champion
                                          wrote on 29 Jul 2021, 11:50 last edited by
                                          #20

                                          @Vince2480 Both seems to be 64bit libs, except that libmysqlclient.20.dylib is missing x86_64.
                                          Do you by any chance use a M1 Mac?

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

                                          V 1 Reply Last reply 29 Jul 2021, 12:01
                                          0

                                          1/62

                                          28 Jul 2021, 23:40

                                          • Login

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