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. build QMYSQL driver under windows 10, a sample solution for QSqlDatabase: QMYSQL driver not loaded
Forum Updated to NodeBB v4.3 + New Features

build QMYSQL driver under windows 10, a sample solution for QSqlDatabase: QMYSQL driver not loaded

Scheduled Pinned Locked Moved Solved General and Desktop
35 Posts 11 Posters 9.6k 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.
  • T thecodemonkey
    1 Jan 2020, 21:41

    in the hope i can help someone: I provide various versions of qsqlmysql.dll here on Github

    H Offline
    H Offline
    hehedaozuiteng
    wrote on 2 Jan 2020, 07:12 last edited by hehedaozuiteng 1 Feb 2020, 07:51
    #15

    @thecodemonkey
    Thank for you help anyway.
    I solved it two days ago. BTW, I do not think 32 bit vision is useful, ( if I am wrong please point out.) Mysql's serves is only offer 64 bit, so the libmysql.dll is also 64 bits. That is why I cannot build the drive at first 2 days lol.

    If someone like me do not know this, he will kill his two days beautiful life XD.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Malibob
      wrote on 23 May 2020, 20:18 last edited by
      #16

      When I run this "qmake -- MYSQL_INCDIR="%Mysql%/MySQL Server 8.0/include" MYSQL_LIBDIR="%Mysql%/MySQL Server 8.0/lib" " it's show me the message " QMake has two modes, one mode for generating project files based on some heuristics, and the other for generating makefiles. Normally you shouldn't need to specify a mode, as makefile generation is the default mode for qmake, but you may use this to test qmake on an existing project " How can i solve this?

      1 Reply Last reply
      0
      • T thecodemonkey
        1 Jan 2020, 21:41

        in the hope i can help someone: I provide various versions of qsqlmysql.dll here on Github

        C Offline
        C Offline
        Camilo Quijano
        wrote on 21 Apr 2021, 21:35 last edited by
        #17

        @thecodemonkey Thank you so much. Your files solved my problem.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          terma.aba
          wrote on 13 May 2021, 08:03 last edited by
          #18
          This post is deleted!
          1 Reply Last reply
          0
          • T thecodemonkey
            1 Jan 2020, 21:41

            in the hope i can help someone: I provide various versions of qsqlmysql.dll here on Github

            C Offline
            C Offline
            cpplegend
            wrote on 29 Jun 2023, 12:34 last edited by
            #19

            @thecodemonkey man I am using qt6.5.1, when I try to compile the driver it says that it doesn't recognize some lines of code when trying to build it... I am following this (the official qt documentation).. I think it doesn't find the mingw compiler.. I installed a new one but it does not work, it isn't recognized by the system also I'm using windows 11.. should I show you what are the errors? (I warn you, they are a lot)

            J 1 Reply Last reply 29 Jun 2023, 12:36
            0
            • C cpplegend
              29 Jun 2023, 12:34

              @thecodemonkey man I am using qt6.5.1, when I try to compile the driver it says that it doesn't recognize some lines of code when trying to build it... I am following this (the official qt documentation).. I think it doesn't find the mingw compiler.. I installed a new one but it does not work, it isn't recognized by the system also I'm using windows 11.. should I show you what are the errors? (I warn you, they are a lot)

              J Online
              J Online
              jsulm
              Lifetime Qt Champion
              wrote on 29 Jun 2023, 12:36 last edited by
              #20

              @cpplegend said in build QMYSQL driver under windows 10, a sample solution for QSqlDatabase: QMYSQL driver not loaded:

              it isn't recognized by the system

              If you want to build in a terminal on Windows then you should always use the terminal provided by Qt. If you installed Qt for MinGW you should have an entry in Windows Start menu to open the terminal preconfigured to use MinGW and Qt.

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

              C 1 Reply Last reply 29 Jun 2023, 12:46
              0
              • J jsulm
                29 Jun 2023, 12:36

                @cpplegend said in build QMYSQL driver under windows 10, a sample solution for QSqlDatabase: QMYSQL driver not loaded:

                it isn't recognized by the system

                If you want to build in a terminal on Windows then you should always use the terminal provided by Qt. If you installed Qt for MinGW you should have an entry in Windows Start menu to open the terminal preconfigured to use MinGW and Qt.

                C Offline
                C Offline
                cpplegend
                wrote on 29 Jun 2023, 12:46 last edited by
                #21

                @jsulm ok now I know I am stupid

                J 1 Reply Last reply 29 Jun 2023, 12:48
                0
                • C cpplegend
                  29 Jun 2023, 12:46

                  @jsulm ok now I know I am stupid

                  J Online
                  J Online
                  jsulm
                  Lifetime Qt Champion
                  wrote on 29 Jun 2023, 12:48 last edited by
                  #22

                  @cpplegend No, there are always things one has to learn when doing something for the first time :-)

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

                  C 1 Reply Last reply 29 Jun 2023, 13:05
                  0
                  • J jsulm
                    29 Jun 2023, 12:48

                    @cpplegend No, there are always things one has to learn when doing something for the first time :-)

                    C Offline
                    C Offline
                    cpplegend
                    wrote on 29 Jun 2023, 13:05 last edited by
                    #23

                    @jsulm thank you..
                    by the way it doesn't work

                    when I build it I get this:
                    [15/25] Building RC object mysql/CMakeFiles/QMYSQLDriverPlugin.dir/QMYSQLDriverPlugin_resource.rc.obj
                    FAILED: mysql/CMakeFiles/QMYSQLDriverPlugin.dir/QMYSQLDriverPlugin_resource.rc.obj
                    C:\Qt\Tools\mingw1120_64\bin\windres.exe -O coff -DMINGW_HAS_SECURE_API=1 -DQMYSQLDriverPlugin_EXPORTS -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_UP_TO=0x040800 -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_PLUGIN -DQT_SQL_LIB -DQT_WARN_DEPRECATED_UP_TO=0x070000 -DUNICODE -DWIN32 -DWIN64 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_WIN64 -I C:/Qt/6.5.1/mingw_64/build-sqldrivers/mysql/QMYSQLDriverPlugin_autogen/include -I C:/Qt/6.5.1/Src/qtbase/src/plugins/sqldrivers/mysql -I C:/Qt/6.5.1/mingw_64/build-sqldrivers/mysql -I C:/Qt/6.5.1/mingw_64/build-sqldrivers/include -I "C:/Program Files/MySQL/MySQL Connector C 6.1/include" -I C:/Qt/6.5.1/mingw_64/include/QtCore -I C:/Qt/6.5.1/mingw_64/include -I C:/Qt/6.5.1/mingw_64/mkspecs/win32-g++ -I C:/Qt/6.5.1/mingw_64/include/QtCore/6.5.1 -I C:/Qt/6.5.1/mingw_64/include/QtCore/6.5.1/QtCore -I C:/Qt/6.5.1/mingw_64/include/QtSql/6.5.1 -I C:/Qt/6.5.1/mingw_64/include/QtSql/6.5.1/QtSql -I C:/Qt/6.5.1/mingw_64/include/QtSql C:/Qt/6.5.1/mingw_64/build-sqldrivers/mysql/QMYSQLDriverPlugin_resource.rc mysql/CMakeFiles/QMYSQLDriverPlugin.dir/QMYSQLDriverPlugin_resource.rc.obj
                    cc1.exe: fatal error: Files/MySQL/MySQL: No such file or directory
                    compilation terminated.
                    cc1.exe: fatal error: Connector: No such file or directory
                    compilation terminated.
                    cc1.exe: fatal error: C: No such file or directory
                    compilation terminated.
                    cc1.exe: fatal error: 6.1/include: No such file or directory
                    compilation terminated.
                    C:\Qt\Tools\mingw1120_64\bin\windres.exe: preprocessing failed.
                    [22/25] Building C object sqlite/CMakeFiles/QSQLiteDriverPlugin.dir/C_/Qt/6.5.1/Src/qtbase/src/3rdparty/sqlite/sqlite3.c.obj
                    ninja: build stopped: subcommand failed.

                    J 1 Reply Last reply 29 Jun 2023, 13:16
                    0
                    • C cpplegend
                      29 Jun 2023, 13:05

                      @jsulm thank you..
                      by the way it doesn't work

                      when I build it I get this:
                      [15/25] Building RC object mysql/CMakeFiles/QMYSQLDriverPlugin.dir/QMYSQLDriverPlugin_resource.rc.obj
                      FAILED: mysql/CMakeFiles/QMYSQLDriverPlugin.dir/QMYSQLDriverPlugin_resource.rc.obj
                      C:\Qt\Tools\mingw1120_64\bin\windres.exe -O coff -DMINGW_HAS_SECURE_API=1 -DQMYSQLDriverPlugin_EXPORTS -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_UP_TO=0x040800 -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_PLUGIN -DQT_SQL_LIB -DQT_WARN_DEPRECATED_UP_TO=0x070000 -DUNICODE -DWIN32 -DWIN64 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_WIN64 -I C:/Qt/6.5.1/mingw_64/build-sqldrivers/mysql/QMYSQLDriverPlugin_autogen/include -I C:/Qt/6.5.1/Src/qtbase/src/plugins/sqldrivers/mysql -I C:/Qt/6.5.1/mingw_64/build-sqldrivers/mysql -I C:/Qt/6.5.1/mingw_64/build-sqldrivers/include -I "C:/Program Files/MySQL/MySQL Connector C 6.1/include" -I C:/Qt/6.5.1/mingw_64/include/QtCore -I C:/Qt/6.5.1/mingw_64/include -I C:/Qt/6.5.1/mingw_64/mkspecs/win32-g++ -I C:/Qt/6.5.1/mingw_64/include/QtCore/6.5.1 -I C:/Qt/6.5.1/mingw_64/include/QtCore/6.5.1/QtCore -I C:/Qt/6.5.1/mingw_64/include/QtSql/6.5.1 -I C:/Qt/6.5.1/mingw_64/include/QtSql/6.5.1/QtSql -I C:/Qt/6.5.1/mingw_64/include/QtSql C:/Qt/6.5.1/mingw_64/build-sqldrivers/mysql/QMYSQLDriverPlugin_resource.rc mysql/CMakeFiles/QMYSQLDriverPlugin.dir/QMYSQLDriverPlugin_resource.rc.obj
                      cc1.exe: fatal error: Files/MySQL/MySQL: No such file or directory
                      compilation terminated.
                      cc1.exe: fatal error: Connector: No such file or directory
                      compilation terminated.
                      cc1.exe: fatal error: C: No such file or directory
                      compilation terminated.
                      cc1.exe: fatal error: 6.1/include: No such file or directory
                      compilation terminated.
                      C:\Qt\Tools\mingw1120_64\bin\windres.exe: preprocessing failed.
                      [22/25] Building C object sqlite/CMakeFiles/QSQLiteDriverPlugin.dir/C_/Qt/6.5.1/Src/qtbase/src/3rdparty/sqlite/sqlite3.c.obj
                      ninja: build stopped: subcommand failed.

                      J Online
                      J Online
                      jsulm
                      Lifetime Qt Champion
                      wrote on 29 Jun 2023, 13:16 last edited by
                      #24

                      @cpplegend said in build QMYSQL driver under windows 10, a sample solution for QSqlDatabase: QMYSQL driver not loaded:

                      cc1.exe: fatal error: Files/MySQL/MySQL: No such file or directory

                      You have paths with spaces which are often problematic, just like in this case.
                      Install the MySQL client lib in a folder without spaces.

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

                      C 1 Reply Last reply 29 Jun 2023, 13:34
                      0
                      • J jsulm
                        29 Jun 2023, 13:16

                        @cpplegend said in build QMYSQL driver under windows 10, a sample solution for QSqlDatabase: QMYSQL driver not loaded:

                        cc1.exe: fatal error: Files/MySQL/MySQL: No such file or directory

                        You have paths with spaces which are often problematic, just like in this case.
                        Install the MySQL client lib in a folder without spaces.

                        C Offline
                        C Offline
                        cpplegend
                        wrote on 29 Jun 2023, 13:34 last edited by
                        #25

                        @jsulm it still doesn't work, it's another error now: [15/25] Building RC object mysql/CMakeFiles/QMYSQLDriverPlugin.dir/QMYSQLDriverPlugin_resource.rc.obj
                        FAILED: mysql/CMakeFiles/QMYSQLDriverPlugin.dir/QMYSQLDriverPlugin_resource.rc.obj
                        C:\Qt\Tools\mingw1120_64\bin\windres.exe -O coff -DMINGW_HAS_SECURE_API=1 -DQMYSQLDriverPlugin_EXPORTS -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_UP_TO=0x040800 -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_PLUGIN -DQT_SQL_LIB -DQT_WARN_DEPRECATED_UP_TO=0x070000 -DUNICODE -DWIN32 -DWIN64 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_WIN64 -I C:/Qt/6.5.1/mingw_64/build-sqldrivers/mysql/QMYSQLDriverPlugin_autogen/include -I C:/Qt/6.5.1/Src/qtbase/src/plugins/sqldrivers/mysql -I C:/Qt/6.5.1/mingw_64/build-sqldrivers/mysql -I C:/Qt/6.5.1/mingw_64/build-sqldrivers/include -I "C:/Program Files/MySQL/MySQL_ConnectorC6.1/include" -I C:/Qt/6.5.1/mingw_64/include/QtCore -I C:/Qt/6.5.1/mingw_64/include -I C:/Qt/6.5.1/mingw_64/mkspecs/win32-g++ -I C:/Qt/6.5.1/mingw_64/include/QtCore/6.5.1 -I C:/Qt/6.5.1/mingw_64/include/QtCore/6.5.1/QtCore -I C:/Qt/6.5.1/mingw_64/include/QtSql/6.5.1 -I C:/Qt/6.5.1/mingw_64/include/QtSql/6.5.1/QtSql -I C:/Qt/6.5.1/mingw_64/include/QtSql C:/Qt/6.5.1/mingw_64/build-sqldrivers/mysql/QMYSQLDriverPlugin_resource.rc mysql/CMakeFiles/QMYSQLDriverPlugin.dir/QMYSQLDriverPlugin_resource.rc.obj
                        cc1.exe: fatal error: Files/MySQL/MySQL_ConnectorC6.1/include: No such file or directory
                        compilation terminated.
                        C:\Qt\Tools\mingw1120_64\bin\windres.exe: preprocessing failed.
                        [22/25] Building C object sqlite/CMakeFiles/QSQLiteDriverPlugin.dir/C_/Qt/6.5.1/Src/qtbase/src/3rdparty/sqlite/sqlite3.c.obj
                        ninja: build stopped: subcommand failed.

                        J 1 Reply Last reply 29 Jun 2023, 13:37
                        0
                        • C cpplegend
                          29 Jun 2023, 13:34

                          @jsulm it still doesn't work, it's another error now: [15/25] Building RC object mysql/CMakeFiles/QMYSQLDriverPlugin.dir/QMYSQLDriverPlugin_resource.rc.obj
                          FAILED: mysql/CMakeFiles/QMYSQLDriverPlugin.dir/QMYSQLDriverPlugin_resource.rc.obj
                          C:\Qt\Tools\mingw1120_64\bin\windres.exe -O coff -DMINGW_HAS_SECURE_API=1 -DQMYSQLDriverPlugin_EXPORTS -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_UP_TO=0x040800 -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_PLUGIN -DQT_SQL_LIB -DQT_WARN_DEPRECATED_UP_TO=0x070000 -DUNICODE -DWIN32 -DWIN64 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_WIN64 -I C:/Qt/6.5.1/mingw_64/build-sqldrivers/mysql/QMYSQLDriverPlugin_autogen/include -I C:/Qt/6.5.1/Src/qtbase/src/plugins/sqldrivers/mysql -I C:/Qt/6.5.1/mingw_64/build-sqldrivers/mysql -I C:/Qt/6.5.1/mingw_64/build-sqldrivers/include -I "C:/Program Files/MySQL/MySQL_ConnectorC6.1/include" -I C:/Qt/6.5.1/mingw_64/include/QtCore -I C:/Qt/6.5.1/mingw_64/include -I C:/Qt/6.5.1/mingw_64/mkspecs/win32-g++ -I C:/Qt/6.5.1/mingw_64/include/QtCore/6.5.1 -I C:/Qt/6.5.1/mingw_64/include/QtCore/6.5.1/QtCore -I C:/Qt/6.5.1/mingw_64/include/QtSql/6.5.1 -I C:/Qt/6.5.1/mingw_64/include/QtSql/6.5.1/QtSql -I C:/Qt/6.5.1/mingw_64/include/QtSql C:/Qt/6.5.1/mingw_64/build-sqldrivers/mysql/QMYSQLDriverPlugin_resource.rc mysql/CMakeFiles/QMYSQLDriverPlugin.dir/QMYSQLDriverPlugin_resource.rc.obj
                          cc1.exe: fatal error: Files/MySQL/MySQL_ConnectorC6.1/include: No such file or directory
                          compilation terminated.
                          C:\Qt\Tools\mingw1120_64\bin\windres.exe: preprocessing failed.
                          [22/25] Building C object sqlite/CMakeFiles/QSQLiteDriverPlugin.dir/C_/Qt/6.5.1/Src/qtbase/src/3rdparty/sqlite/sqlite3.c.obj
                          ninja: build stopped: subcommand failed.

                          J Online
                          J Online
                          jsulm
                          Lifetime Qt Champion
                          wrote on 29 Jun 2023, 13:37 last edited by
                          #26

                          @cpplegend said in build QMYSQL driver under windows 10, a sample solution for QSqlDatabase: QMYSQL driver not loaded:

                          it's another error now

                          It's same type of error - you have spaces in your paths.
                          Did you install the client library in a path without spaces?
                          If so then please start from clean build folder.

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

                          1 Reply Last reply
                          0
                          • hskoglundH Online
                            hskoglundH Online
                            hskoglund
                            wrote on 29 Jun 2023, 13:44 last edited by hskoglund
                            #27

                            Just want to confirm @jsulm is correct, I see a space here:
                            -I "C:/Program Files/MySQL/MySQL_ConnectorC6.1/include" -

                            C 1 Reply Last reply 29 Jun 2023, 13:48
                            0
                            • hskoglundH hskoglund
                              29 Jun 2023, 13:44

                              Just want to confirm @jsulm is correct, I see a space here:
                              -I "C:/Program Files/MySQL/MySQL_ConnectorC6.1/include" -

                              C Offline
                              C Offline
                              cpplegend
                              wrote on 29 Jun 2023, 13:48 last edited by cpplegend
                              #28

                              @hskoglund lol program files hahahhaha haven't seen it, because I am italian the name was "programmi" without any space, thank you by the way

                              J 1 Reply Last reply 29 Jun 2023, 13:52
                              0
                              • C cpplegend
                                29 Jun 2023, 13:48

                                @hskoglund lol program files hahahhaha haven't seen it, because I am italian the name was "programmi" without any space, thank you by the way

                                J Online
                                J Online
                                jsulm
                                Lifetime Qt Champion
                                wrote on 29 Jun 2023, 13:52 last edited by
                                #29

                                @cpplegend said in build QMYSQL driver under windows 10, a sample solution for QSqlDatabase: QMYSQL driver not loaded:

                                because I am italian the name was "programmi"

                                Yes, Windows tries to hide things from the user :-)

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

                                C 1 Reply Last reply 29 Jun 2023, 14:14
                                0
                                • J jsulm
                                  29 Jun 2023, 13:52

                                  @cpplegend said in build QMYSQL driver under windows 10, a sample solution for QSqlDatabase: QMYSQL driver not loaded:

                                  because I am italian the name was "programmi"

                                  Yes, Windows tries to hide things from the user :-)

                                  C Offline
                                  C Offline
                                  cpplegend
                                  wrote on 29 Jun 2023, 14:14 last edited by cpplegend
                                  #30

                                  @jsulm yeah... now it worked thank you I am so happy, I have been trying to build this driver for 4 days, now it worked and I have the build, now it should work or I have to do anything else? because I tried to instantiate a connection to a database in mysql and it doesn't work, it still says Driver not loaded.

                                  J 1 Reply Last reply 29 Jun 2023, 14:23
                                  0
                                  • C cpplegend
                                    29 Jun 2023, 14:14

                                    @jsulm yeah... now it worked thank you I am so happy, I have been trying to build this driver for 4 days, now it worked and I have the build, now it should work or I have to do anything else? because I tried to instantiate a connection to a database in mysql and it doesn't work, it still says Driver not loaded.

                                    J Online
                                    J Online
                                    jsulm
                                    Lifetime Qt Champion
                                    wrote on 29 Jun 2023, 14:23 last edited by
                                    #31

                                    @cpplegend Did you also did "make install" step?
                                    To debug plug-in problems you can set QT_DEBUG_PLUGINS variable before running the app and check the output. See https://doc.qt.io/qt-6/debug.html
                                    My guess is that the MySQL client library cannot be found. I'm not sure, but I think you need to copy it to same location as the plug-in.

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

                                    C 2 Replies Last reply 29 Jun 2023, 14:33
                                    1
                                    • J jsulm
                                      29 Jun 2023, 14:23

                                      @cpplegend Did you also did "make install" step?
                                      To debug plug-in problems you can set QT_DEBUG_PLUGINS variable before running the app and check the output. See https://doc.qt.io/qt-6/debug.html
                                      My guess is that the MySQL client library cannot be found. I'm not sure, but I think you need to copy it to same location as the plug-in.

                                      C Offline
                                      C Offline
                                      cpplegend
                                      wrote on 29 Jun 2023, 14:33 last edited by
                                      #32
                                      This post is deleted!
                                      1 Reply Last reply
                                      0
                                      • J jsulm
                                        29 Jun 2023, 14:23

                                        @cpplegend Did you also did "make install" step?
                                        To debug plug-in problems you can set QT_DEBUG_PLUGINS variable before running the app and check the output. See https://doc.qt.io/qt-6/debug.html
                                        My guess is that the MySQL client library cannot be found. I'm not sure, but I think you need to copy it to same location as the plug-in.

                                        C Offline
                                        C Offline
                                        cpplegend
                                        wrote on 29 Jun 2023, 16:15 last edited by cpplegend
                                        #33

                                        @jsulm I don't think I understand, what should I do now? I've done install

                                        J 1 Reply Last reply 30 Jun 2023, 05:07
                                        0
                                        • C cpplegend
                                          29 Jun 2023, 16:15

                                          @jsulm I don't think I understand, what should I do now? I've done install

                                          J Online
                                          J Online
                                          jsulm
                                          Lifetime Qt Champion
                                          wrote on 30 Jun 2023, 05:07 last edited by
                                          #34

                                          @cpplegend said in build QMYSQL driver under windows 10, a sample solution for QSqlDatabase: QMYSQL driver not loaded:

                                          what should I do now?

                                          Set QT_DEBUG_PLUGINS env variable before starting your app. Either in QtCreator in "Run Environment" of your project or, if you start your app manually in a terminal, using "export QT_DEBUG_PLUGINS=1". Then check the output of the application to see why the plug-in is not loaded.

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

                                          JonBJ 1 Reply Last reply 30 Jun 2023, 06:51
                                          1

                                          • Login

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