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 Driver not loaded

QSqlDatabase Driver not loaded

Scheduled Pinned Locked Moved Solved General and Desktop
15 Posts 3 Posters 15.6k Views 2 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.
  • hskoglundH Offline
    hskoglundH Offline
    hskoglund
    wrote on last edited by
    #6

    Hi is there any difference if you put libmysqld.dll in the same directory as your .exe file?

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #7

      I already have it in the same directory. However, I don't know it if works. It seems that it isn't detected by the program:

      QFactoryLoader::QFactoryLoader() looking at "C:/Qt/5.11.1/msvc2017_64/plugins/sqldrivers/libmysqld.dll"
      "Failed to extract plugin meta data from 'C:/Qt/5.11.1/msvc2017_64/plugins/sqldrivers/libmysqld.dll'"
               not a plugin
      
      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #8

        As @hskoglund wrote: in the same folder as your application executable, not in the folder of the plugin.

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

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by A Former User
          #9

          It is in the .exe and also plugin folder. I deleted the one from plugin directory and now log looks like this: pastebin - the libmysqld.dll file is not even loaded. This is the plugin folder: imgur and the .exe directory: imgur

          1 Reply Last reply
          0
          • hskoglundH Offline
            hskoglundH Offline
            hskoglund
            wrote on last edited by hskoglund
            #10

            Hmm that error 0x000000c1 could mean your 64-bit MySql is not installed 100%.

            If you compile in Release mode instead of Debug, you get that same error 0x000000c1?

            Edit: also check that you indeed installed the 64-bit version of MySql and not the 32-bit version, easiest way to check:
            mysql.exe --V

            1 Reply Last reply
            1
            • ? Offline
              ? Offline
              A Former User
              wrote on last edited by A Former User
              #11

              I had 64-bit MySql Server and 32-bit C Connector so I replaced it with 64-bit C++ Conector. I have tried compiling in the Release mode with no success. Should I reinstall the Qt libraries?

              Cannot load library C:\Qt\5.11.1\msvc2017_64\plugins\sqldrivers\qsqlmysql.dll
              

              I think this may be the problem - file is in the directory but is not recognized by the program.

              1 Reply Last reply
              0
              • hskoglundH Offline
                hskoglundH Offline
                hskoglund
                wrote on last edited by
                #12

                I think the qsqlmysql.dll file is ok, but since it's depending on libmysql.dll being present in the same directory as your Qt .exe file, if that libmysql.dll is 32-bit, then you could have an error anyway.

                1 Reply Last reply
                1
                • ? Offline
                  ? Offline
                  A Former User
                  wrote on last edited by A Former User
                  #13

                  Can I download it (64 bit, Qt 5.11.1) without reinstalling the whole Qt?

                  1 Reply Last reply
                  0
                  • hskoglundH Offline
                    hskoglundH Offline
                    hskoglund
                    wrote on last edited by
                    #14

                    I think you can do it by downloading the offline installer (never tried it) but easiest is most likely just to start MaintenanceTool.exe, remove the 5.11.1 MSVC2017 64-bit component and then selecting/installing it again.

                    1 Reply Last reply
                    0
                    • ? Offline
                      ? Offline
                      A Former User
                      wrote on last edited by A Former User
                      #15

                      I have reinstalled the Qt libraries and replaced all the files in the exe directory with the newer version, and it works now. This is what I have in the folder: exe file, libmysql.dll, Qt5Core.dll and Qt5Sql.dll (in release mode).

                      Thank you for help!

                      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