Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. I had complied qsqlmysql.dll.
Forum Updated to NodeBB v4.3 + New Features

I had complied qsqlmysql.dll.

Scheduled Pinned Locked Moved Unsolved Qt 6
28 Posts 4 Posters 4.7k 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.
  • yuyuY yuyu

    @jsulm the unreadable characters is what I use qDebug output chineses,I had delete it.
    now
    mycode

     qDebug() << QSqlDatabase::drivers();
    
        QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
        db.setHostName("localhost");
        db.setPort(3306);
        db.setDatabaseName("mydb");
        db.setUserName("root");
        db.setPassword("123456");
        bool ok = db.open();
    

    the console

    
    16:45:13: Debugging D:\1a_perfect\build-testsql-Desktop_Qt_6_3_0_MinGW_64_bit-Debug\debug\testsql.exe ...
    qt.core.plugin.factoryloader: checking directory path "C:/Qt/6.3.0/mingw_64/plugins/platforms" ...
    qt.core.plugin.factoryloader: looking at "C:/Qt/6.3.0/mingw_64/plugins/platforms/qdirect2d.dll"
    qt.core.plugin.loader: Found metadata in lib C:/Qt/6.3.0/mingw_64/plugins/platforms/qdirect2d.dll, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "direct2d"
            ]
        },
        "archlevel": 2,
        "className": "QWindowsDirect2DIntegrationPlugin",
        "debug": false,
        "version": 393984
    }
    
    qt.core.plugin.factoryloader: Got keys from plugin meta data QList("direct2d")
    qt.core.plugin.factoryloader: looking at "C:/Qt/6.3.0/mingw_64/plugins/platforms/qminimal.dll"
    qt.core.plugin.loader: Found metadata in lib C:/Qt/6.3.0/mingw_64/plugins/platforms/qminimal.dll, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "minimal"
            ]
        },
        "archlevel": 2,
        "className": "QMinimalIntegrationPlugin",
        "debug": false,
        "version": 393984
    }
    
    qt.core.plugin.factoryloader: Got keys from plugin meta data QList("minimal")
    qt.core.plugin.factoryloader: looking at "C:/Qt/6.3.0/mingw_64/plugins/platforms/qoffscreen.dll"
    qt.core.plugin.loader: Found metadata in lib C:/Qt/6.3.0/mingw_64/plugins/platforms/qoffscreen.dll, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "offscreen"
            ]
        },
        "archlevel": 2,
        "className": "QOffscreenIntegrationPlugin",
        "debug": false,
        "version": 393984
    }
    
    qt.core.plugin.factoryloader: Got keys from plugin meta data QList("offscreen")
    qt.core.plugin.factoryloader: looking at "C:/Qt/6.3.0/mingw_64/plugins/platforms/qwindows.dll"
    qt.core.plugin.loader: Found metadata in lib C:/Qt/6.3.0/mingw_64/plugins/platforms/qwindows.dll, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "windows"
            ]
        },
        "archlevel": 2,
        "className": "QWindowsIntegrationPlugin",
        "debug": false,
        "version": 393984
    }
    
    qt.core.plugin.factoryloader: Got keys from plugin meta data QList("windows")
    qt.core.plugin.factoryloader: checking directory path "D:/1a_perfect/build-testsql-Desktop_Qt_6_3_0_MinGW_64_bit-Debug/debug/platforms" ...
    qt.core.library: "C:/Qt/6.3.0/mingw_64/plugins/platforms/qwindows.dll" loaded library
    qt.core.plugin.factoryloader: checking directory path "C:/Qt/6.3.0/mingw_64/plugins/platformthemes" ...
    qt.core.plugin.factoryloader: checking directory path "D:/1a_perfect/build-testsql-Desktop_Qt_6_3_0_MinGW_64_bit-Debug/debug/platformthemes" ...
    qt.core.plugin.factoryloader: checking directory path "C:/Qt/6.3.0/mingw_64/plugins/styles" ...
    qt.core.plugin.factoryloader: looking at "C:/Qt/6.3.0/mingw_64/plugins/styles/qwindowsvistastyle.dll"
    qt.core.plugin.loader: Found metadata in lib C:/Qt/6.3.0/mingw_64/plugins/styles/qwindowsvistastyle.dll, metadata=
    {
        "IID": "org.qt-project.Qt.QStyleFactoryInterface",
        "MetaData": {
            "Keys": [
                "windowsvista"
            ]
        },
        "archlevel": 2,
        "className": "QWindowsVistaStylePlugin",
        "debug": false,
        "version": 393984
    }
    
    qt.core.plugin.factoryloader: Got keys from plugin meta data QList("windowsvista")
    qt.core.plugin.factoryloader: checking directory path "D:/1a_perfect/build-testsql-Desktop_Qt_6_3_0_MinGW_64_bit-Debug/debug/styles" ...
    qt.core.library: "C:/Qt/6.3.0/mingw_64/plugins/styles/qwindowsvistastyle.dll" loaded library
    qt.core.plugin.factoryloader: checking directory path "C:/Qt/6.3.0/mingw_64/plugins/iconengines" ...
    qt.core.plugin.factoryloader: looking at "C:/Qt/6.3.0/mingw_64/plugins/iconengines/qsvgicon.dll"
    qt.core.plugin.loader: Found metadata in lib C:/Qt/6.3.0/mingw_64/plugins/iconengines/qsvgicon.dll, metadata=
    {
        "IID": "org.qt-project.Qt.QIconEngineFactoryInterface",
        "MetaData": {
            "Keys": [
                "svg",
                "svgz",
                "svg.gz"
            ]
        },
        "archlevel": 2,
        "className": "QSvgIconPlugin",
        "debug": false,
        "version": 393984
    }
    
    qt.core.plugin.factoryloader: Got keys from plugin meta data QList("svg", "svgz", "svg.gz")
    qt.core.plugin.factoryloader: checking directory path "D:/1a_perfect/build-testsql-Desktop_Qt_6_3_0_MinGW_64_bit-Debug/debug/iconengines" ...
    qt.core.plugin.factoryloader: checking directory path "C:/Qt/6.3.0/mingw_64/plugins/imageformats" ...
    qt.core.plugin.factoryloader: looking at "C:/Qt/6.3.0/mingw_64/plugins/imageformats/qgif.dll"
    qt.core.plugin.loader: Found metadata in lib C:/Qt/6.3.0/mingw_64/plugins/imageformats/qgif.dll, metadata=
    {
        "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
        "MetaData": {
            "Keys": [
                "gif"
            ],
            "MimeTypes": [
                "image/gif"
            ]
        },
        "archlevel": 2,
        "className": "QGifPlugin",
        "debug": false,
        "version": 393984
    }
    
    qt.core.plugin.factoryloader: Got keys from plugin meta data QList("gif")
    qt.core.plugin.factoryloader: looking at "C:/Qt/6.3.0/mingw_64/plugins/imageformats/qico.dll"
    qt.core.plugin.loader: Found metadata in lib C:/Qt/6.3.0/mingw_64/plugins/imageformats/qico.dll, metadata=
    {
        "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
        "MetaData": {
            "Keys": [
                "ico",
                "cur"
            ],
            "MimeTypes": [
                "image/vnd.microsoft.icon",
                "image/vnd.microsoft.icon"
            ]
        },
        "archlevel": 2,
        "className": "QICOPlugin",
        "debug": false,
        "version": 393984
    }
    
    qt.core.plugin.factoryloader: Got keys from plugin meta data QList("ico", "cur")
    qt.core.plugin.factoryloader: looking at "C:/Qt/6.3.0/mingw_64/plugins/imageformats/qjpeg.dll"
    qt.core.plugin.loader: Found metadata in lib C:/Qt/6.3.0/mingw_64/plugins/imageformats/qjpeg.dll, metadata=
    {
        "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
        "MetaData": {
            "Keys": [
                "jpg",
                "jpeg"
            ],
            "MimeTypes": [
                "image/jpeg",
                "image/jpeg"
            ]
        },
        "archlevel": 2,
        "className": "QJpegPlugin",
        "debug": false,
        "version": 393984
    }
    
    qt.core.plugin.factoryloader: Got keys from plugin meta data QList("jpg", "jpeg")
    qt.core.plugin.factoryloader: looking at "C:/Qt/6.3.0/mingw_64/plugins/imageformats/qsvg.dll"
    qt.core.plugin.loader: Found metadata in lib C:/Qt/6.3.0/mingw_64/plugins/imageformats/qsvg.dll, metadata=
    {
        "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface",
        "MetaData": {
            "Keys": [
                "svg",
                "svgz"
            ],
            "MimeTypes": [
                "image/svg+xml",
                "image/svg+xml-compressed"
            ]
        },
        "archlevel": 2,
        "className": "QSvgPlugin",
        "debug": false,
        "version": 393984
    }
    
    qt.core.plugin.factoryloader: Got keys from plugin meta data QList("svg", "svgz")
    qt.core.plugin.factoryloader: checking directory path "D:/1a_perfect/build-testsql-Desktop_Qt_6_3_0_MinGW_64_bit-Debug/debug/imageformats" ...
    qt.core.library: "C:/Qt/6.3.0/mingw_64/plugins/imageformats/qgif.dll" loaded library
    qt.core.library: "C:/Qt/6.3.0/mingw_64/plugins/imageformats/qico.dll" loaded library
    qt.core.library: "C:/Qt/6.3.0/mingw_64/plugins/imageformats/qjpeg.dll" loaded library
    qt.core.library: "C:/Qt/6.3.0/mingw_64/plugins/imageformats/qsvg.dll" loaded library
    qt.core.plugin.factoryloader: checking directory path "C:/Qt/6.3.0/mingw_64/plugins/sqldrivers" ...
    qt.core.plugin.factoryloader: looking at "C:/Qt/6.3.0/mingw_64/plugins/sqldrivers/qsqlite.dll"
    qt.core.plugin.loader: Found metadata in lib C:/Qt/6.3.0/mingw_64/plugins/sqldrivers/qsqlite.dll, metadata=
    {
        "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
        "MetaData": {
            "Keys": [
                "QSQLITE"
            ]
        },
        "archlevel": 2,
        "className": "QSQLiteDriverPlugin",
        "debug": false,
        "version": 393984
    }
    
    qt.core.plugin.factoryloader: Got keys from plugin meta data QList("QSQLITE")
    qt.core.plugin.factoryloader: looking at "C:/Qt/6.3.0/mingw_64/plugins/sqldrivers/qsqlmysql.dll"
    qt.core.plugin.loader: Found metadata in lib C:/Qt/6.3.0/mingw_64/plugins/sqldrivers/qsqlmysql.dll, metadata=
    {
        "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
        "MetaData": {
            "Keys": [
                "QMYSQL",
                "QMARIADB"
            ]
        },
        "archlevel": 2,
        "className": "QMYSQLDriverPlugin",
        "debug": true,
        "version": 393984
    }
    
    qt.core.plugin.factoryloader: Got keys from plugin meta data QList("QMYSQL", "QMARIADB")
    qt.core.plugin.factoryloader: looking at "C:/Qt/6.3.0/mingw_64/plugins/sqldrivers/qsqlodbc.dll"
    qt.core.plugin.loader: Found metadata in lib C:/Qt/6.3.0/mingw_64/plugins/sqldrivers/qsqlodbc.dll, metadata=
    {
        "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
        "MetaData": {
            "Keys": [
                "QODBC"
            ]
        },
        "archlevel": 2,
        "className": "QODBCDriverPlugin",
        "debug": false,
        "version": 393984
    }
    
    qt.core.plugin.factoryloader: Got keys from plugin meta data QList("QODBC")
    qt.core.plugin.factoryloader: looking at "C:/Qt/6.3.0/mingw_64/plugins/sqldrivers/qsqlpsql.dll"
    qt.core.plugin.loader: Found metadata in lib C:/Qt/6.3.0/mingw_64/plugins/sqldrivers/qsqlpsql.dll, metadata=
    {
        "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
        "MetaData": {
            "Keys": [
                "QPSQL"
            ]
        },
        "archlevel": 2,
        "className": "QPSQLDriverPlugin",
        "debug": false,
        "version": 393984
    }
    
    qt.core.plugin.factoryloader: Got keys from plugin meta data QList("QPSQL")
    qt.core.plugin.factoryloader: checking directory path "D:/1a_perfect/build-testsql-Desktop_Qt_6_3_0_MinGW_64_bit-Debug/debug/sqldrivers" ...
    QList("QSQLITE", "QMARIADB", "QMYSQL", "QODBC", "QPSQL")
    qt.core.library: "C:/Qt/6.3.0/mingw_64/plugins/sqldrivers/qsqlmysql.dll" loaded library
    qt.core.plugin.factoryloader: checking directory path "C:/Qt/6.3.0/mingw_64/plugins/accessible" ...
    qt.core.plugin.factoryloader: checking directory path "D:/1a_perfect/build-testsql-Desktop_Qt_6_3_0_MinGW_64_bit-Debug/debug/accessible" ...
    qt.core.plugin.factoryloader: checking directory path "C:/Qt/6.3.0/mingw_64/plugins/accessiblebridge" ...
    qt.core.plugin.factoryloader: checking directory path "D:/1a_perfect/build-testsql-Desktop_Qt_6_3_0_MinGW_64_bit-Debug/debug/accessiblebridge" ...
    
    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #14

    @yuyu said in I had complied qsqlmysql.dll.:

    qt.core.library: "C:/Qt/6.3.0/mingw_64/plugins/sqldrivers/qsqlmysql.dll" loaded library

    Looks good now

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

    yuyuY 1 Reply Last reply
    0
    • jsulmJ jsulm

      @yuyu said in I had complied qsqlmysql.dll.:

      qt.core.library: "C:/Qt/6.3.0/mingw_64/plugins/sqldrivers/qsqlmysql.dll" loaded library

      Looks good now

      yuyuY Offline
      yuyuY Offline
      yuyu
      wrote on last edited by
      #15

      @jsulm I can not connect my mysql database .

      jsulmJ NevezN 2 Replies Last reply
      0
      • yuyuY yuyu

        @jsulm I can not connect my mysql database .

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

        @yuyu What does db.open() return?
        What does https://doc.qt.io/qt-5/qsqldatabase.html#lastError return after open() call?

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

        yuyuY 1 Reply Last reply
        0
        • yuyuY yuyu

          @jsulm I can not connect my mysql database .

          NevezN Offline
          NevezN Offline
          Nevez
          wrote on last edited by
          #17

          @yuyu Still getting driver not installed error? and yes share the result of db.open() as well.

          1 Reply Last reply
          0
          • jsulmJ jsulm

            @yuyu What does db.open() return?
            What does https://doc.qt.io/qt-5/qsqldatabase.html#lastError return after open() call?

            yuyuY Offline
            yuyuY Offline
            yuyu
            wrote on last edited by
            #18

            @jsulm false

            jsulmJ 1 Reply Last reply
            0
            • yuyuY yuyu

              @jsulm false

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

              @yuyu I asked two questions. Would you be so kind to also answer the second one?

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

              yuyuY 1 Reply Last reply
              0
              • jsulmJ jsulm

                @yuyu I asked two questions. Would you be so kind to also answer the second one?

                yuyuY Offline
                yuyuY Offline
                yuyu
                wrote on last edited by
                #20

                @Nevez yes,but I had install it. it return false.
                sometime has
                42e82386-47d7-4a05-91c6-2934dd95689d-image.png

                qt.core.plugin.loader: QLibraryPrivate::loadPlugin failed on "C:/Qt/6.3.0/mingw_64/plugins/sqldrivers/qsqlmysql.dll" : "Cannot load library C:\\Qt\\6.3.0\\mingw_64\\plugins\\sqldrivers\\qsqlmysql.dll:
                
                jsulmJ NevezN 2 Replies Last reply
                0
                • yuyuY yuyu

                  @Nevez yes,but I had install it. it return false.
                  sometime has
                  42e82386-47d7-4a05-91c6-2934dd95689d-image.png

                  qt.core.plugin.loader: QLibraryPrivate::loadPlugin failed on "C:/Qt/6.3.0/mingw_64/plugins/sqldrivers/qsqlmysql.dll" : "Cannot load library C:\\Qt\\6.3.0\\mingw_64\\plugins\\sqldrivers\\qsqlmysql.dll:
                  
                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #21

                  @yuyu I'm confused: before you posted output showing that the plug-in was loaded.
                  Now you posted output showing that it could not be loaded.

                  Please do again what was suggested before: set QT_DEBUG_PLUGINS and if the plug-in fails to load post the output here...

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

                  yuyuY 1 Reply Last reply
                  0
                  • jsulmJ jsulm

                    @yuyu I'm confused: before you posted output showing that the plug-in was loaded.
                    Now you posted output showing that it could not be loaded.

                    Please do again what was suggested before: set QT_DEBUG_PLUGINS and if the plug-in fails to load post the output here...

                    yuyuY Offline
                    yuyuY Offline
                    yuyu
                    wrote on last edited by
                    #22

                    @jsulm you can try it ,it may be a problem,you can use mysql 8.0.28 and qt6.3 , you can find this error.

                    jsulmJ 1 Reply Last reply
                    0
                    • yuyuY yuyu

                      @jsulm you can try it ,it may be a problem,you can use mysql 8.0.28 and qt6.3 , you can find this error.

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

                      @yuyu I'm not going to try anything.
                      I suggested what you can do to get help.
                      It is up to you to do that or not...

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

                      yuyuY 1 Reply Last reply
                      0
                      • jsulmJ jsulm

                        @yuyu I'm not going to try anything.
                        I suggested what you can do to get help.
                        It is up to you to do that or not...

                        yuyuY Offline
                        yuyuY Offline
                        yuyu
                        wrote on last edited by
                        #24

                        @jsulm I think it's a waste of time, regardless of the problem

                        1 Reply Last reply
                        0
                        • yuyuY yuyu

                          @Nevez yes,but I had install it. it return false.
                          sometime has
                          42e82386-47d7-4a05-91c6-2934dd95689d-image.png

                          qt.core.plugin.loader: QLibraryPrivate::loadPlugin failed on "C:/Qt/6.3.0/mingw_64/plugins/sqldrivers/qsqlmysql.dll" : "Cannot load library C:\\Qt\\6.3.0\\mingw_64\\plugins\\sqldrivers\\qsqlmysql.dll:
                          
                          NevezN Offline
                          NevezN Offline
                          Nevez
                          wrote on last edited by
                          #25

                          @yuyu
                          I am using Mysql 8.x.x and QT 6.2.3. Mysql works fine too.
                          According to the error you get, you may have placed the relevant DLL in the wrong place or you may have used the wrong version DLL.
                          There was a video on youtube that did this well. You will find it on your first search.

                          yuyuY 1 Reply Last reply
                          0
                          • NevezN Nevez

                            @yuyu
                            I am using Mysql 8.x.x and QT 6.2.3. Mysql works fine too.
                            According to the error you get, you may have placed the relevant DLL in the wrong place or you may have used the wrong version DLL.
                            There was a video on youtube that did this well. You will find it on your first search.

                            yuyuY Offline
                            yuyuY Offline
                            yuyu
                            wrote on last edited by
                            #26

                            @Nevez said in I had complied qsqlmysql.dll.:

                            I am using Mysql 8.x.x and QT 6.2.3. Mysql works fine too.
                            According to the error you get, you may have placed the relevant DLL in the wrong place or you may have used the wrong version DLL.
                            There was a video on youtube that did this well. You will find it on your first search.

                            I user mysql >8.0.19,I see the doc, tha say
                            87882de6-de9b-4b19-9f2b-eec86429632f-image.png

                            NevezN 1 Reply Last reply
                            0
                            • yuyuY yuyu

                              @Nevez said in I had complied qsqlmysql.dll.:

                              I am using Mysql 8.x.x and QT 6.2.3. Mysql works fine too.
                              According to the error you get, you may have placed the relevant DLL in the wrong place or you may have used the wrong version DLL.
                              There was a video on youtube that did this well. You will find it on your first search.

                              I user mysql >8.0.19,I see the doc, tha say
                              87882de6-de9b-4b19-9f2b-eec86429632f-image.png

                              NevezN Offline
                              NevezN Offline
                              Nevez
                              wrote on last edited by
                              #27

                              @yuyu
                              so i am using 8.0.27, i recommend you too.

                              yuyuY 1 Reply Last reply
                              0
                              • NevezN Nevez

                                @yuyu
                                so i am using 8.0.27, i recommend you too.

                                yuyuY Offline
                                yuyuY Offline
                                yuyu
                                wrote on last edited by
                                #28

                                @Nevez en,than you very much .I think it is ok ,I will use 8.0.27.That is a good idea.

                                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