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. Dreaded Mysql drivers not loaded problem

Dreaded Mysql drivers not loaded problem

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 393 Views 1 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.
  • J Offline
    J Offline
    JSher
    wrote on last edited by
    #1

    I know there are countless posts about this. I have read numerous and cannot figure out where I am going wrong.

    Environment:
    Mac OS Catalina
    Latest QT Creator and Mysql downloads.

    I have a project on windows and it works fine, deployment is finally working.

    I am now trying to deploy on a mac however I cannot get the program working.

    I have it running and no error however cannot get the dreaded Mysql connection working.

    I am not sure where to go next.

    The plugins trace is Cannot load library /Users/macos/QT/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib Library not loaded: /usr/local/mysql/lib/libmysqlclient.20.dylib

    Now this is strange considering I have libmysqlclient.21.dylib and the install_name_tool command I ran was -change libmysqlclient.21.dylib /usr/local/mysql/lib/libmysqlclient.21.dylib /Users/macos/Qt/5.9.9/clang_64/plugins/sqldrivers/libqsqlmysql.dylib

    Any advise?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      JSher
      wrote on last edited by
      #5

      Got it working thanks.

      https://forum.qt.io/topic/82663/qmysql-driver-not-loaded-on-mac/41

      near the bottom helped me understand it. I had to rename the library to 20 in the mysql(pointer?) directory from the main mysqlXXXX directory.

      Thanks,
      --James

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

        Hi,

        You need to provide the correct entry to be replaced not just the library file name.

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

          @SGaist I apologize but I do not have any experience with mac.

          I am unsure what you mean by that?

          Thanks,
          --James

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

            Your install_name_tool call is wrong. When you want to change a path to a library you have to provide the complete entry you want to replace.

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

              Got it working thanks.

              https://forum.qt.io/topic/82663/qmysql-driver-not-loaded-on-mac/41

              near the bottom helped me understand it. I had to rename the library to 20 in the mysql(pointer?) directory from the main mysqlXXXX directory.

              Thanks,
              --James

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

                Do you mean you changed a file name on your disk ? If so then you are doing it wrong.

                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

                • Login

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