Important: Please read the Qt Code of Conduct -

Unable to find drivers for msyql.

  • 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:

    -->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.

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

  • 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:

    libmysql.dll, others
    sqldrivers (folder)

    Putting it there solved it.

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

Log in to reply