Important: Please read the Qt Code of Conduct -

MySQL driver/plugin and libmysql.dll for Qt5 MSVS2017 64-bit

  • This post is deleted!

  • Moderators

    deploy the mysql lib along with the plugin or the exe.... or make sure it's inside the PATH
    And that its built using the same compiler of course

  • @raven-worx I believe I'm doing just that. Lets forget about MSVS2017 64-bit kit for now, I'm using default "Desktop Qt 5.10.1 MinGW 32bit" kit just to get it to work. Plugin qsqlmysql.dll file is in C:\Qt\5.10.1\mingw53_32\plugins\sqldrivers (it's where Qt Installer put it, I don't build Qt by my own so it has to be the same compiler) and I was never before moving it anywhere and my application was running. 32-bit libmysql.dll I got with MySQL Installer, by installing 32-bit MySQL Connector/C. After compiling my application, I copy the file to where the EXE is so it's $$OUT_PWD/debug. Still getting the error.

  • Lifetime Qt Champion

    @dijuna As @raven-worx mentioned most probably the problem is that libmysql.dll was built using a different compiler and therefore is not compatible with your MinGW Qt.

  • @jsulm but libmysql.dll is provided by Oracle, you don't build it by your own, right? So this problem should occur for everybody using 5.10.1 Qt and 5.7.21 MySQL Server. Noone noticed it just stopped working all of sudden?

  • Lifetime Qt Champion

    @dijuna You apparently didn't try to search here for this issue - it is really not new and didn't stop working all of sudden.
    Whether it works or not out of the box depends on the compiler you're using. My guess is that Oracle uses Visual C++ for Windows builds. You're using MinGW - this combination can't work (it isn't a Qt issue). You can build the MySql client library by yourself with MinGW or use Visual C++ compiler on Windows.

  • My bad, oh my, it's just a typo... "MYSQL", not "QMYSQL"... sorry.

Log in to reply