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. [SOLVED]MySQL library problem
Forum Update on Monday, May 27th 2025

[SOLVED]MySQL library problem

Scheduled Pinned Locked Moved General and Desktop
mysqldriverpluginsql
36 Posts 3 Posters 12.9k Views
  • 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.
  • C Offline
    C Offline
    cpuin
    wrote on 27 Jun 2015, 19:53 last edited by
    #13

    YES it is there

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 27 Jun 2015, 19:57 last edited by SGaist
      #14

      Then you have to do

      install_name_tool -change /opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib /usr/local/mysql/PATH_TO_libmysqlclient.X.dylib PATH_TO_libqsqlmysql.dylib
      

      In any case, if you are not using it in your application, you can also ignore the message and remove the plugin from the bundle.

      [edit: added missing target SGaist]

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

      C 1 Reply Last reply 27 Jun 2015, 20:09
      0
      • C Offline
        C Offline
        cpuin
        wrote on 27 Jun 2015, 20:00 last edited by
        #15

        I deleted all plugins , left only libqsqlite.dylib
        The app doesn't work!

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 27 Jun 2015, 20:01 last edited by
          #16

          You have to give more details. "Doesn't work" doesn't give enough information to help you. Do you have any error message ?

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

          C 1 Reply Last reply 27 Jun 2015, 20:06
          0
          • M Offline
            M Offline
            mcosta
            wrote on 27 Jun 2015, 20:01 last edited by
            #17

            seems that macqtdeploy has some hardcoded PATH for MySQL and PostgreSQL.

            Once your problem is solved don't forget to:

            • Mark the thread as SOLVED using the Topic Tool menu
            • Vote up the answer(s) that helped you to solve the issue

            You can embed images using (http://imgur.com/) or (http://postimage.org/)

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 27 Jun 2015, 20:03 last edited by
              #18

              @mcosta not it doesn't, macdeployqt parses the output of otool to get the dependencies of the libraries/plugins of Qt. AFAICT, the plugins are built with dependencies coming from MacPorts hence the libmysqlclient.18.dylib in /opt/local/lib/

              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
              • S SGaist
                27 Jun 2015, 20:01

                You have to give more details. "Doesn't work" doesn't give enough information to help you. Do you have any error message ?

                C Offline
                C Offline
                cpuin
                wrote on 27 Jun 2015, 20:06 last edited by
                #19

                @SGaist said:

                install_name_tool -

                LSOpenURLsWithRole() failed with error -10810 for the file

                1 Reply Last reply
                0
                • S SGaist
                  27 Jun 2015, 19:57

                  Then you have to do

                  install_name_tool -change /opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib /usr/local/mysql/PATH_TO_libmysqlclient.X.dylib PATH_TO_libqsqlmysql.dylib
                  

                  In any case, if you are not using it in your application, you can also ignore the message and remove the plugin from the bundle.

                  [edit: added missing target SGaist]

                  C Offline
                  C Offline
                  cpuin
                  wrote on 27 Jun 2015, 20:09 last edited by
                  #20

                  @SGaist said:

                  /opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib

                  install_name_tool -change /opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib /usr/local/mysql-5.6.25-osx10.8-x86_64/lib/libmysqlclient.18.dylib
                  Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool [-change old new] ... [-rpath old new] ... [-add_rpath new] ... [-delete_rpath old] ... [-id name] input

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on 27 Jun 2015, 20:25 last edited by
                    #21

                    Which version of OS X and Qt are you using ?

                    I've corrected the example line

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

                    C 2 Replies Last reply 27 Jun 2015, 20:31
                    0
                    • S SGaist
                      27 Jun 2015, 20:25

                      Which version of OS X and Qt are you using ?

                      I've corrected the example line

                      C Offline
                      C Offline
                      cpuin
                      wrote on 27 Jun 2015, 20:31 last edited by
                      #22

                      @SGaist

                      OS X 10.10.3
                      QT 5.4

                      1 Reply Last reply
                      0
                      • S SGaist
                        27 Jun 2015, 20:25

                        Which version of OS X and Qt are you using ?

                        I've corrected the example line

                        C Offline
                        C Offline
                        cpuin
                        wrote on 27 Jun 2015, 20:38 last edited by cpuin
                        #23

                        @SGaist said:

                        PATH_TO_libqsqlmysql.dylib

                        install_name_tool -change /opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib /usr/local/mysql-5.6.25-osx10.8-x86_64/lib/libmysqlclient.18.dylib Users/jorost/Qt5.4.2/5.4/clang_64/plugins/sqldrivers/libqsqlmysql.dylib
                        error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: Users/jorost/Qt5.4.2/5.4/clang_64/plugins/sqldrivers/libqsqlmysql.dylib (No such file or directory)

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on 27 Jun 2015, 20:44 last edited by
                          #24

                          You're missing a slash before Users

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

                          C 1 Reply Last reply 27 Jun 2015, 20:46
                          0
                          • S SGaist
                            27 Jun 2015, 20:44

                            You're missing a slash before Users

                            C Offline
                            C Offline
                            cpuin
                            wrote on 27 Jun 2015, 20:46 last edited by
                            #25

                            @SGaist
                            Now i got only Postgre error

                            ERROR: no file at "/usr/local/lib/libpq.5.dylib"

                            Does it mean that i have working mysql plugin?

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on 27 Jun 2015, 21:43 last edited by
                              #26

                              You should, unless the libmysqlclient is very different from the one Qt was built with.

                              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
                              • C Offline
                                C Offline
                                cpuin
                                wrote on 28 Jun 2015, 20:55 last edited by
                                #27

                                I have now mysql working, but i still can't have working app because of this:
                                ERROR: no file at "/usr/local/lib/libpq.5.dylib"

                                This is not very good approach: include all plug-ins w/out need of them.

                                1 Reply Last reply
                                0
                                • S Offline
                                  S Offline
                                  SGaist
                                  Lifetime Qt Champion
                                  wrote on 28 Jun 2015, 20:58 last edited by
                                  #28

                                  That's the PostgreSQL plugin. Like I suggested before, just remove the plugins you don't need from your bundle.

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

                                  C 1 Reply Last reply 29 Jun 2015, 08:14
                                  0
                                  • S SGaist
                                    28 Jun 2015, 20:58

                                    That's the PostgreSQL plugin. Like I suggested before, just remove the plugins you don't need from your bundle.

                                    C Offline
                                    C Offline
                                    cpuin
                                    wrote on 29 Jun 2015, 08:14 last edited by
                                    #29

                                    @SGaist

                                    As i answered before when removing all other plugins from the bundle, the app doesn't open!

                                    1 Reply Last reply
                                    0
                                    • S Offline
                                      S Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on 30 Jun 2015, 12:52 last edited by
                                      #30

                                      I didn't suggest to remove all other plugins, just the SQL related plugins you don't use

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

                                      C 1 Reply Last reply 30 Jun 2015, 13:03
                                      0
                                      • S SGaist
                                        30 Jun 2015, 12:52

                                        I didn't suggest to remove all other plugins, just the SQL related plugins you don't use

                                        C Offline
                                        C Offline
                                        cpuin
                                        wrote on 30 Jun 2015, 13:03 last edited by
                                        #31

                                        @SGaist Exactly, i left only sqlite plugin and the app doesn't open

                                        1 Reply Last reply
                                        0
                                        • S Offline
                                          S Offline
                                          SGaist
                                          Lifetime Qt Champion
                                          wrote on 30 Jun 2015, 13:07 last edited by
                                          #32

                                          Start it from the command line, what does it tell you ?

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

                                          C 1 Reply Last reply 30 Jun 2015, 13:37
                                          1

                                          22/36

                                          27 Jun 2015, 20:31

                                          • Login

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