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. Unable to find drivers for msyql.
Qt 6.11 is out! See what's new in the release blog

Unable to find drivers for msyql.

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 2.0k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hello,

    I have successfully compiled QMYSQL drivers, and can load them on a machine where Qt is installed. When I copy my executable and the required dlls to another computer however (where Qt is not installed), I get driver not loaded. Here is what is copied to client's computer during install, which should be everything that is necessary:

    app_folder
    -->myApp.exe
    -->libmysql.dll, qsqlmysql4.dll, qsqlmysqld4.dll, qtsql4.dll, qtsqld4.dll, qtcore4.dll, qtcored4.dll, qtgui4.dll, qtguid4.dll.

    In the pro file I simply link to drivers using:
    LIBS += "libmysql.lib"
    LIBS += "qsqlmysqld4.lib"

    Both are in the project directory.

    Any suggestions would certainly be helpful.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      You'll need to build them. They are not installed by default.

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

        I had already built the entire qt library from source, as well as the qmysql driver (stated in first post). It turns out, that on the client's machine, qsqlmysqld4.dll needs to reside in a subdirectory of the application's executable directory, called sqldrivers, like so:

        app_folder
        myApp.exe
        libmysql.dll, others
        sqldrivers (folder)
        qsqlmysqld4.dll

        Putting it there solved it.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          I'm sorry, I must have totally misread your post.

          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