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. QSqlDatabase: QMYSQL driver not loaded
Forum Updated to NodeBB v4.3 + New Features

QSqlDatabase: QMYSQL driver not loaded

Scheduled Pinned Locked Moved Solved General and Desktop
20 Posts 4 Posters 1.3k 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.
  • SPlattenS SPlatten

    I've been developing and running from within Qt Creator version 4.4.1, with Qt 5.9.2, everything is ok within Qt Creator, I have used windeployqt.exe which created an install folder, I've copied my release executable into this folder, but when I try and run from a command prompt the application starts then displays:

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

    I launch the application with exactly the same command line parameters that I do when running within Qt Creator. What do I need to do in order for it to find the QMYSQL driver?

    KroMignonK Offline
    KroMignonK Offline
    KroMignon
    wrote on last edited by KroMignon
    #3

    @SPlatten said in QSqlDatabase: QMYSQL driver not loaded:

    I launch the application with exactly the same command line parameters that I do when running within Qt Creator. What do I need to do in order for it to find the QMYSQL driver?

    Have you verified that the mysql c/c++ connector shared library is provided with your installer?

    It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

    SPlattenS 1 Reply Last reply
    0
    • O Offline
      O Offline
      ollarch
      wrote on last edited by
      #4

      Check if your path points to your bin and lib directories of your MySQL installation.

      jsulmJ 1 Reply Last reply
      0
      • O ollarch

        Check if your path points to your bin and lib directories of your MySQL installation.

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #5

        @ollarch said in QSqlDatabase: QMYSQL driver not loaded:

        MySQL installation

        This is not relevant here, as it is about deployed application which should contain everything needed (including MySQL client driver lib).

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

        SPlattenS 1 Reply Last reply
        0
        • KroMignonK KroMignon

          @SPlatten said in QSqlDatabase: QMYSQL driver not loaded:

          I launch the application with exactly the same command line parameters that I do when running within Qt Creator. What do I need to do in order for it to find the QMYSQL driver?

          Have you verified that the mysql c/c++ connector shared library is provided with your installer?

          SPlattenS Offline
          SPlattenS Offline
          SPlatten
          wrote on last edited by
          #6

          @KroMignon, how?

          Kind Regards,
          Sy

          KroMignonK 1 Reply Last reply
          0
          • jsulmJ jsulm

            @ollarch said in QSqlDatabase: QMYSQL driver not loaded:

            MySQL installation

            This is not relevant here, as it is about deployed application which should contain everything needed (including MySQL client driver lib).

            SPlattenS Offline
            SPlattenS Offline
            SPlatten
            wrote on last edited by
            #7

            @jsulm , in the .\install\sqldrivers\ there is qsqlmysql.dll

            Kind Regards,
            Sy

            jsulmJ 1 Reply Last reply
            0
            • SPlattenS SPlatten

              @jsulm , in the .\install\sqldrivers\ there is qsqlmysql.dll

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #8

              @SPlatten I'm talking about MySQL client driver, not the Qt MySQL plug-in.
              Please do what I suggested, this will save us time guessing what the problem could be...

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

              1 Reply Last reply
              0
              • jsulmJ jsulm

                @SPlatten said in QSqlDatabase: QMYSQL driver not loaded:

                What do I need to do in order for it to find the QMYSQL driver?

                Search in the forum - this is asked again and again and again.
                Set QT_DEBUG_PLUGINS before starting your app and check output (https://doc.qt.io/qt-5/debug.html).

                SPlattenS Offline
                SPlattenS Offline
                SPlatten
                wrote on last edited by SPlatten
                #9

                @jsulm , I now see:

                Cannot load library C:\Users\simon.platten\Documents\install\sqldrivers\qsqlmysql.dll: The specified module could not be found.
                

                How do I get the deployment tool to add the mysql connector/c 6.1 if that is whats required?

                Kind Regards,
                Sy

                jsulmJ 1 Reply Last reply
                0
                • SPlattenS SPlatten

                  @jsulm , I now see:

                  Cannot load library C:\Users\simon.platten\Documents\install\sqldrivers\qsqlmysql.dll: The specified module could not be found.
                  

                  How do I get the deployment tool to add the mysql connector/c 6.1 if that is whats required?

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by jsulm
                  #10

                  @SPlatten said in QSqlDatabase: QMYSQL driver not loaded:

                  I now see

                  Is there something above this error? Usually the problem is not qsqlmysql.dll but missing MySQL client library which is used by qsqlmysql.dll. Please post the whole output.

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

                  SPlattenS 1 Reply Last reply
                  0
                  • jsulmJ jsulm

                    @SPlatten said in QSqlDatabase: QMYSQL driver not loaded:

                    I now see

                    Is there something above this error? Usually the problem is not qsqlmysql.dll but missing MySQL client library which is used by qsqlmysql.dll. Please post the whole output.

                    SPlattenS Offline
                    SPlattenS Offline
                    SPlatten
                    wrote on last edited by
                    #11

                    @jsulm , thank you, here is the full output:

                    QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/install/platforms" ...
                    QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/platforms/qwindows.dll"
                    Found metadata in lib C:/Users/simon.platten/Documents/install/platforms/qwindows.dll, metadata=
                    {
                        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                        "MetaData": {
                            "Keys": [
                                "windows"
                            ]
                        },
                        "className": "QWindowsIntegrationPlugin",
                        "debug": false,
                        "version": 329986
                    }
                     
                     
                    Got keys from plugin meta data ("windows")
                    loaded library "C:/Users/simon.platten/Documents/install/platforms/qwindows.dll"
                    QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/install/platformthemes" ...
                    QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/install/styles" ...
                    Chelton - Training Server
                    QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/install/imageformats" ...
                    QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/imageformats/qgif.dll"
                    Found metadata in lib C:/Users/simon.platten/Documents/install/imageformats/qgif.dll, metadata=
                    {
                        "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
                        "MetaData": {
                            "Keys": [
                                "gif"
                            ],
                            "MimeTypes": [
                               "image/gif"
                            ]
                        },
                        "className": "QGifPlugin",
                        "debug": false,
                        "version": 329986
                    }
                     
                     
                    Got keys from plugin meta data ("gif")
                    QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/imageformats/qicns.dll"
                    Found metadata in lib C:/Users/simon.platten/Documents/install/imageformats/qicns.dll, metadata=
                    {
                        "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
                        "MetaData": {
                            "Keys": [
                                "icns"
                            ],
                            "MimeTypes": [
                                "image/x-icns"
                            ]
                        },
                        "className": "QICNSPlugin",
                        "debug": false,
                        "version": 329986
                    }
                     
                     
                    Got keys from plugin meta data ("icns")
                    QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/imageformats/qico.dll"
                    Found metadata in lib C:/Users/simon.platten/Documents/install/imageformats/qico.dll, metadata=
                    {
                        "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
                        "MetaData": {
                            "Keys": [
                                "ico",
                                "cur"
                            ],
                            "MimeTypes": [
                                "image/vnd.microsoft.icon"
                            ]
                        },
                        "className": "QICOPlugin",
                        "debug": false,
                        "version": 329986
                    }
                     
                     
                    Got keys from plugin meta data ("ico", "cur")
                    QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/imageformats/qjpeg.dll"
                    Found metadata in lib C:/Users/simon.platten/Documents/install/imageformats/qjpeg.dll, metadata=
                    {
                        "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
                        "MetaData": {
                            "Keys": [
                                "jpg",
                                "jpeg"
                            ],
                            "MimeTypes": [
                                "image/jpeg",
                                "image/jpeg"
                            ]
                        },
                        "className": "QJpegPlugin",
                        "debug": false,
                        "version": 329986
                    }
                     
                     
                    Got keys from plugin meta data ("jpg", "jpeg")
                    QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/imageformats/qsvg.dll"
                    Found metadata in lib C:/Users/simon.platten/Documents/install/imageformats/qsvg.dll, metadata=
                    {
                        "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
                        "MetaData": {
                            "Keys": [
                                "svg",
                                "svgz"
                            ],
                            "MimeTypes": [
                                "image/svg+xml",
                                "image/svg+xml-compressed"
                            ]
                        },
                        "className": "QSvgPlugin",
                        "debug": false,
                        "version": 329986
                    }
                     
                     
                    Got keys from plugin meta data ("svg", "svgz")
                    QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/imageformats/qtga.dll"
                    Found metadata in lib C:/Users/simon.platten/Documents/install/imageformats/qtga.dll, metadata=
                    {
                        "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
                        "MetaData": {
                            "Keys": [
                                "tga"
                            ],
                            "MimeTypes": [
                                "image/x-tga"
                            ]
                        },
                        "className": "QTgaPlugin",
                        "debug": false,
                        "version": 329986
                    }
                     
                     
                    Got keys from plugin meta data ("tga")
                    QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/imageformats/qtiff.dll"
                    Found metadata in lib C:/Users/simon.platten/Documents/install/imageformats/qtiff.dll, metadata=
                    {
                        "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
                        "MetaData": {
                            "Keys": [
                                "tiff",
                                "tif"
                            ],
                            "MimeTypes": [
                                "image/tiff",
                                "image/tiff"
                            ]
                        },
                        "className": "QTiffPlugin",
                        "debug": false,
                        "version": 329986
                    }
                     
                     
                    Got keys from plugin meta data ("tiff", "tif")
                    QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/imageformats/qwbmp.dll"
                    Found metadata in lib C:/Users/simon.platten/Documents/install/imageformats/qwbmp.dll, metadata=
                    {
                        "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
                        "MetaData": {
                            "Keys": [
                                "wbmp"
                            ],
                            "MimeTypes": [
                                "image/vnd.wap.wbmp"
                            ]
                        },
                        "className": "QWbmpPlugin",
                        "debug": false,
                        "version": 329986
                    }
                     
                     
                    Got keys from plugin meta data ("wbmp")
                    QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/imageformats/qwebp.dll"
                    Found metadata in lib C:/Users/simon.platten/Documents/install/imageformats/qwebp.dll, metadata=
                    {
                        "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
                        "MetaData": {
                            "Keys": [
                                "webp"
                            ],
                            "MimeTypes": [
                                "image/webp"
                            ]
                        },
                        "className": "QWebpPlugin",
                        "debug": false,
                        "version": 329986
                    }
                     
                     
                    Got keys from plugin meta data ("webp")
                    loaded library "C:/Users/simon.platten/Documents/install/imageformats/qgif.dll"
                    loaded library "C:/Users/simon.platten/Documents/install/imageformats/qicns.dll"
                    loaded library "C:/Users/simon.platten/Documents/install/imageformats/qico.dll"
                    loaded library "C:/Users/simon.platten/Documents/install/imageformats/qjpeg.dll"
                    loaded library "C:/Users/simon.platten/Documents/install/imageformats/qsvg.dll"
                    loaded library "C:/Users/simon.platten/Documents/install/imageformats/qtga.dll"
                    loaded library "C:/Users/simon.platten/Documents/install/imageformats/qtiff.dll"
                    loaded library "C:/Users/simon.platten/Documents/install/imageformats/qwbmp.dll"
                    loaded library "C:/Users/simon.platten/Documents/install/imageformats/qwebp.dll"
                    QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/install/accessible" ...
                    QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/install/sqldrivers" ...
                    QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/sqldrivers/qsqlite.dll"
                    Found metadata in lib C:/Users/simon.platten/Documents/install/sqldrivers/qsqlite.dll, metadata=
                    {
                        "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                        "MetaData": {
                            "Keys": [
                                "QSQLITE"
                            ]
                        },
                        "className": "QSQLiteDriverPlugin",
                        "debug": false,
                        "version": 329986
                    }
                     
                     
                    Got keys from plugin meta data ("QSQLITE")
                    QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/sqldrivers/qsqlmysql.dll"
                    Found metadata in lib C:/Users/simon.platten/Documents/install/sqldrivers/qsqlmysql.dll, metadata=
                    {
                        "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                        "MetaData": {
                            "Keys": [
                                "QMYSQL3",
                                "QMYSQL"
                            ]
                        },
                        "className": "QMYSQLDriverPlugin",
                        "debug": false,
                        "version": 329986
                    }
                     
                     
                    Got keys from plugin meta data ("QMYSQL3", "QMYSQL")
                    QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/sqldrivers/qsqlodbc.dll"
                    Found metadata in lib C:/Users/simon.platten/Documents/install/sqldrivers/qsqlodbc.dll, metadata=
                    {
                        "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                        "MetaData": {
                            "Keys": [
                                "QODBC3",
                                "QODBC"
                            ]
                        },
                        "className": "QODBCDriverPlugin",
                        "debug": false,
                        "version": 329986
                    }
                     
                     
                    Got keys from plugin meta data ("QODBC3", "QODBC")
                    QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/sqldrivers/qsqlpsql.dll"
                    Found metadata in lib C:/Users/simon.platten/Documents/install/sqldrivers/qsqlpsql.dll, metadata=
                    {
                        "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                        "MetaData": {
                            "Keys": [
                                "QPSQL7",
                                "QPSQL"
                            ]
                        },
                        "className": "QPSQLDriverPlugin",
                        "debug": false,
                        "version": 329986
                    }
                     
                     
                    Got keys from plugin meta data ("QPSQL7", "QPSQL")
                    Cannot load library C:\Users\simon.platten\Documents\install\sqldrivers\qsqlmysql.dll: The specified module could not be found.
                    QLibraryPrivate::loadPlugin failed on "C:/Users/simon.platten/Documents/install/sqldrivers/qsqlmysql.dll" : "Cannot load library C:\\Users\\simon.platten\\Documents\\install\\sqldrivers\\qsqlmysql.dll: The specified module could not be found."
                    QSqlDatabase: QMYSQL driver not loaded
                    QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
                    QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/install/accessiblebridge" ...
                    QLibraryPrivate::unload succeeded on "C:/Users/simon.platten/Documents/install/imageformats/qgif.dll"
                    QLibraryPrivate::unload succeeded on "C:/Users/simon.platten/Documents/install/imageformats/qicns.dll"
                    QLibraryPrivate::unload succeeded on "C:/Users/simon.platten/Documents/install/imageformats/qico.dll"
                    QLibraryPrivate::unload succeeded on "C:/Users/simon.platten/Documents/install/imageformats/qjpeg.dll"
                    QLibraryPrivate::unload succeeded on "C:/Users/simon.platten/Documents/install/imageformats/qsvg.dll"
                    QLibraryPrivate::unload succeeded on "C:/Users/simon.platten/Documents/install/imageformats/qtga.dll"
                    QLibraryPrivate::unload succeeded on "C:/Users/simon.platten/Documents/install/imageformats/qtiff.dll"
                    QLibraryPrivate::unload succeeded on "C:/Users/simon.platten/Documents/install/imageformats/qwbmp.dll"
                    QLibraryPrivate::unload succeeded on "C:/Users/simon.platten/Documents/install/imageformats/qwebp.dll"
                    QLibraryPrivate::unload succeeded on "C:/Users/simon.platten/Documents/install/platforms/qwindows.dll"
                    

                    Kind Regards,
                    Sy

                    jsulmJ 1 Reply Last reply
                    0
                    • SPlattenS SPlatten

                      @jsulm , thank you, here is the full output:

                      QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/install/platforms" ...
                      QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/platforms/qwindows.dll"
                      Found metadata in lib C:/Users/simon.platten/Documents/install/platforms/qwindows.dll, metadata=
                      {
                          "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                          "MetaData": {
                              "Keys": [
                                  "windows"
                              ]
                          },
                          "className": "QWindowsIntegrationPlugin",
                          "debug": false,
                          "version": 329986
                      }
                       
                       
                      Got keys from plugin meta data ("windows")
                      loaded library "C:/Users/simon.platten/Documents/install/platforms/qwindows.dll"
                      QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/install/platformthemes" ...
                      QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/install/styles" ...
                      Chelton - Training Server
                      QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/install/imageformats" ...
                      QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/imageformats/qgif.dll"
                      Found metadata in lib C:/Users/simon.platten/Documents/install/imageformats/qgif.dll, metadata=
                      {
                          "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
                          "MetaData": {
                              "Keys": [
                                  "gif"
                              ],
                              "MimeTypes": [
                                 "image/gif"
                              ]
                          },
                          "className": "QGifPlugin",
                          "debug": false,
                          "version": 329986
                      }
                       
                       
                      Got keys from plugin meta data ("gif")
                      QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/imageformats/qicns.dll"
                      Found metadata in lib C:/Users/simon.platten/Documents/install/imageformats/qicns.dll, metadata=
                      {
                          "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
                          "MetaData": {
                              "Keys": [
                                  "icns"
                              ],
                              "MimeTypes": [
                                  "image/x-icns"
                              ]
                          },
                          "className": "QICNSPlugin",
                          "debug": false,
                          "version": 329986
                      }
                       
                       
                      Got keys from plugin meta data ("icns")
                      QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/imageformats/qico.dll"
                      Found metadata in lib C:/Users/simon.platten/Documents/install/imageformats/qico.dll, metadata=
                      {
                          "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
                          "MetaData": {
                              "Keys": [
                                  "ico",
                                  "cur"
                              ],
                              "MimeTypes": [
                                  "image/vnd.microsoft.icon"
                              ]
                          },
                          "className": "QICOPlugin",
                          "debug": false,
                          "version": 329986
                      }
                       
                       
                      Got keys from plugin meta data ("ico", "cur")
                      QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/imageformats/qjpeg.dll"
                      Found metadata in lib C:/Users/simon.platten/Documents/install/imageformats/qjpeg.dll, metadata=
                      {
                          "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
                          "MetaData": {
                              "Keys": [
                                  "jpg",
                                  "jpeg"
                              ],
                              "MimeTypes": [
                                  "image/jpeg",
                                  "image/jpeg"
                              ]
                          },
                          "className": "QJpegPlugin",
                          "debug": false,
                          "version": 329986
                      }
                       
                       
                      Got keys from plugin meta data ("jpg", "jpeg")
                      QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/imageformats/qsvg.dll"
                      Found metadata in lib C:/Users/simon.platten/Documents/install/imageformats/qsvg.dll, metadata=
                      {
                          "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
                          "MetaData": {
                              "Keys": [
                                  "svg",
                                  "svgz"
                              ],
                              "MimeTypes": [
                                  "image/svg+xml",
                                  "image/svg+xml-compressed"
                              ]
                          },
                          "className": "QSvgPlugin",
                          "debug": false,
                          "version": 329986
                      }
                       
                       
                      Got keys from plugin meta data ("svg", "svgz")
                      QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/imageformats/qtga.dll"
                      Found metadata in lib C:/Users/simon.platten/Documents/install/imageformats/qtga.dll, metadata=
                      {
                          "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
                          "MetaData": {
                              "Keys": [
                                  "tga"
                              ],
                              "MimeTypes": [
                                  "image/x-tga"
                              ]
                          },
                          "className": "QTgaPlugin",
                          "debug": false,
                          "version": 329986
                      }
                       
                       
                      Got keys from plugin meta data ("tga")
                      QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/imageformats/qtiff.dll"
                      Found metadata in lib C:/Users/simon.platten/Documents/install/imageformats/qtiff.dll, metadata=
                      {
                          "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
                          "MetaData": {
                              "Keys": [
                                  "tiff",
                                  "tif"
                              ],
                              "MimeTypes": [
                                  "image/tiff",
                                  "image/tiff"
                              ]
                          },
                          "className": "QTiffPlugin",
                          "debug": false,
                          "version": 329986
                      }
                       
                       
                      Got keys from plugin meta data ("tiff", "tif")
                      QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/imageformats/qwbmp.dll"
                      Found metadata in lib C:/Users/simon.platten/Documents/install/imageformats/qwbmp.dll, metadata=
                      {
                          "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
                          "MetaData": {
                              "Keys": [
                                  "wbmp"
                              ],
                              "MimeTypes": [
                                  "image/vnd.wap.wbmp"
                              ]
                          },
                          "className": "QWbmpPlugin",
                          "debug": false,
                          "version": 329986
                      }
                       
                       
                      Got keys from plugin meta data ("wbmp")
                      QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/imageformats/qwebp.dll"
                      Found metadata in lib C:/Users/simon.platten/Documents/install/imageformats/qwebp.dll, metadata=
                      {
                          "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
                          "MetaData": {
                              "Keys": [
                                  "webp"
                              ],
                              "MimeTypes": [
                                  "image/webp"
                              ]
                          },
                          "className": "QWebpPlugin",
                          "debug": false,
                          "version": 329986
                      }
                       
                       
                      Got keys from plugin meta data ("webp")
                      loaded library "C:/Users/simon.platten/Documents/install/imageformats/qgif.dll"
                      loaded library "C:/Users/simon.platten/Documents/install/imageformats/qicns.dll"
                      loaded library "C:/Users/simon.platten/Documents/install/imageformats/qico.dll"
                      loaded library "C:/Users/simon.platten/Documents/install/imageformats/qjpeg.dll"
                      loaded library "C:/Users/simon.platten/Documents/install/imageformats/qsvg.dll"
                      loaded library "C:/Users/simon.platten/Documents/install/imageformats/qtga.dll"
                      loaded library "C:/Users/simon.platten/Documents/install/imageformats/qtiff.dll"
                      loaded library "C:/Users/simon.platten/Documents/install/imageformats/qwbmp.dll"
                      loaded library "C:/Users/simon.platten/Documents/install/imageformats/qwebp.dll"
                      QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/install/accessible" ...
                      QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/install/sqldrivers" ...
                      QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/sqldrivers/qsqlite.dll"
                      Found metadata in lib C:/Users/simon.platten/Documents/install/sqldrivers/qsqlite.dll, metadata=
                      {
                          "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                          "MetaData": {
                              "Keys": [
                                  "QSQLITE"
                              ]
                          },
                          "className": "QSQLiteDriverPlugin",
                          "debug": false,
                          "version": 329986
                      }
                       
                       
                      Got keys from plugin meta data ("QSQLITE")
                      QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/sqldrivers/qsqlmysql.dll"
                      Found metadata in lib C:/Users/simon.platten/Documents/install/sqldrivers/qsqlmysql.dll, metadata=
                      {
                          "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                          "MetaData": {
                              "Keys": [
                                  "QMYSQL3",
                                  "QMYSQL"
                              ]
                          },
                          "className": "QMYSQLDriverPlugin",
                          "debug": false,
                          "version": 329986
                      }
                       
                       
                      Got keys from plugin meta data ("QMYSQL3", "QMYSQL")
                      QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/sqldrivers/qsqlodbc.dll"
                      Found metadata in lib C:/Users/simon.platten/Documents/install/sqldrivers/qsqlodbc.dll, metadata=
                      {
                          "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                          "MetaData": {
                              "Keys": [
                                  "QODBC3",
                                  "QODBC"
                              ]
                          },
                          "className": "QODBCDriverPlugin",
                          "debug": false,
                          "version": 329986
                      }
                       
                       
                      Got keys from plugin meta data ("QODBC3", "QODBC")
                      QFactoryLoader::QFactoryLoader() looking at "C:/Users/simon.platten/Documents/install/sqldrivers/qsqlpsql.dll"
                      Found metadata in lib C:/Users/simon.platten/Documents/install/sqldrivers/qsqlpsql.dll, metadata=
                      {
                          "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                          "MetaData": {
                              "Keys": [
                                  "QPSQL7",
                                  "QPSQL"
                              ]
                          },
                          "className": "QPSQLDriverPlugin",
                          "debug": false,
                          "version": 329986
                      }
                       
                       
                      Got keys from plugin meta data ("QPSQL7", "QPSQL")
                      Cannot load library C:\Users\simon.platten\Documents\install\sqldrivers\qsqlmysql.dll: The specified module could not be found.
                      QLibraryPrivate::loadPlugin failed on "C:/Users/simon.platten/Documents/install/sqldrivers/qsqlmysql.dll" : "Cannot load library C:\\Users\\simon.platten\\Documents\\install\\sqldrivers\\qsqlmysql.dll: The specified module could not be found."
                      QSqlDatabase: QMYSQL driver not loaded
                      QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
                      QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/simon.platten/Documents/install/accessiblebridge" ...
                      QLibraryPrivate::unload succeeded on "C:/Users/simon.platten/Documents/install/imageformats/qgif.dll"
                      QLibraryPrivate::unload succeeded on "C:/Users/simon.platten/Documents/install/imageformats/qicns.dll"
                      QLibraryPrivate::unload succeeded on "C:/Users/simon.platten/Documents/install/imageformats/qico.dll"
                      QLibraryPrivate::unload succeeded on "C:/Users/simon.platten/Documents/install/imageformats/qjpeg.dll"
                      QLibraryPrivate::unload succeeded on "C:/Users/simon.platten/Documents/install/imageformats/qsvg.dll"
                      QLibraryPrivate::unload succeeded on "C:/Users/simon.platten/Documents/install/imageformats/qtga.dll"
                      QLibraryPrivate::unload succeeded on "C:/Users/simon.platten/Documents/install/imageformats/qtiff.dll"
                      QLibraryPrivate::unload succeeded on "C:/Users/simon.platten/Documents/install/imageformats/qwbmp.dll"
                      QLibraryPrivate::unload succeeded on "C:/Users/simon.platten/Documents/install/imageformats/qwebp.dll"
                      QLibraryPrivate::unload succeeded on "C:/Users/simon.platten/Documents/install/platforms/qwindows.dll"
                      
                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #12

                      @SPlatten said in QSqlDatabase: QMYSQL driver not loaded:

                      C:\Users\simon.platten\Documents\install\sqldrivers\qsqlmysql.dll

                      Does it exist?

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

                      SPlattenS 1 Reply Last reply
                      0
                      • SPlattenS SPlatten

                        @KroMignon, how?

                        KroMignonK Offline
                        KroMignonK Offline
                        KroMignon
                        wrote on last edited by KroMignon
                        #13

                        @SPlatten said in QSqlDatabase: QMYSQL driver not loaded:

                        how?

                        is libmysql.dll (which is the mysql connector/c DLL) available in your installation?

                        It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

                        SPlattenS 1 Reply Last reply
                        0
                        • jsulmJ jsulm

                          @SPlatten said in QSqlDatabase: QMYSQL driver not loaded:

                          C:\Users\simon.platten\Documents\install\sqldrivers\qsqlmysql.dll

                          Does it exist?

                          SPlattenS Offline
                          SPlattenS Offline
                          SPlatten
                          wrote on last edited by
                          #14

                          @jsulm , yes, it's 100% there.

                          Kind Regards,
                          Sy

                          jsulmJ 1 Reply Last reply
                          0
                          • SPlattenS SPlatten

                            @jsulm , yes, it's 100% there.

                            jsulmJ Offline
                            jsulmJ Offline
                            jsulm
                            Lifetime Qt Champion
                            wrote on last edited by
                            #15

                            @SPlatten Then probably libmysql.dll is missing

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

                            1 Reply Last reply
                            0
                            • KroMignonK KroMignon

                              @SPlatten said in QSqlDatabase: QMYSQL driver not loaded:

                              how?

                              is libmysql.dll (which is the mysql connector/c DLL) available in your installation?

                              SPlattenS Offline
                              SPlattenS Offline
                              SPlatten
                              wrote on last edited by SPlatten
                              #16

                              @KroMignon I don't see it, but how on the same system does it work in Qt Creator?

                              I found libmariadb.dll in **C:\Program Files (x86)\MariaDB 10.5\lib\**, should I copy that to the install folder?

                              Just tried that, still same problem.

                              Kind Regards,
                              Sy

                              jsulmJ KroMignonK 3 Replies Last reply
                              0
                              • SPlattenS SPlatten

                                @KroMignon I don't see it, but how on the same system does it work in Qt Creator?

                                I found libmariadb.dll in **C:\Program Files (x86)\MariaDB 10.5\lib\**, should I copy that to the install folder?

                                Just tried that, still same problem.

                                jsulmJ Offline
                                jsulmJ Offline
                                jsulm
                                Lifetime Qt Champion
                                wrote on last edited by
                                #17

                                @SPlatten said in QSqlDatabase: QMYSQL driver not loaded:

                                but how on the same system does it work in Qt Creator?

                                QtCreator prepares the environment before it starts your app.

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

                                SPlattenS 1 Reply Last reply
                                0
                                • jsulmJ jsulm

                                  @SPlatten said in QSqlDatabase: QMYSQL driver not loaded:

                                  but how on the same system does it work in Qt Creator?

                                  QtCreator prepares the environment before it starts your app.

                                  SPlattenS Offline
                                  SPlattenS Offline
                                  SPlatten
                                  wrote on last edited by SPlatten
                                  #18

                                  @jsulm , please see edited reply to @KroMignon...

                                  Now its working, found libmysql.dll in C:\Program Files (x86)\MySQL\MySQL Connector C 6.1\lib copied to install folder, now it works!

                                  Thank you for your help!

                                  Kind Regards,
                                  Sy

                                  1 Reply Last reply
                                  0
                                  • SPlattenS SPlatten

                                    @KroMignon I don't see it, but how on the same system does it work in Qt Creator?

                                    I found libmariadb.dll in **C:\Program Files (x86)\MariaDB 10.5\lib\**, should I copy that to the install folder?

                                    Just tried that, still same problem.

                                    jsulmJ Offline
                                    jsulmJ Offline
                                    jsulm
                                    Lifetime Qt Champion
                                    wrote on last edited by
                                    #19

                                    @SPlatten said in QSqlDatabase: QMYSQL driver not loaded:

                                    should I copy that to the install folder?

                                    Put it next to qsqlmysql.dll (in C:\Users\simon.platten\Documents\install\sqldrivers)

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

                                    1 Reply Last reply
                                    0
                                    • SPlattenS SPlatten

                                      @KroMignon I don't see it, but how on the same system does it work in Qt Creator?

                                      I found libmariadb.dll in **C:\Program Files (x86)\MariaDB 10.5\lib\**, should I copy that to the install folder?

                                      Just tried that, still same problem.

                                      KroMignonK Offline
                                      KroMignonK Offline
                                      KroMignon
                                      wrote on last edited by
                                      #20

                                      @SPlatten said in QSqlDatabase: QMYSQL driver not loaded:

                                      I don't see it, but how on the same system does it work in Qt Creator? I found libmariadb.dll in **C:\Program Files (x86)\MariaDB 10.5\lib**, should I copy that to the install folder?

                                      Perhaps the easiest way would be to use dependency walker to see which DLL are required for your mysql plugin sqldrivers/qsqlmysql.dll

                                      I don't know how you have build the plugin.
                                      You could try to copy the DLL into the plugin path, so it will be reachable. But be sure it is the right one!

                                      It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

                                      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