0

I have been using MySQL with QT C++ and it's working fine. Now I want to update to QT 6.3.0 and I need to re-do the procedure again.

So there are one man who pre-compile libarires for MySQL support for QT. https://github.com/thecodemonkey86/qt_mysql_driver

He writes:

  1. put qsqlmysql.dll (if release build) / qsqlmysqld.dll (if debug build, but note that when using MinGW 8.1.0 the debug build is named qsqlmysql.dll as well) in application subdirectory "sqldrivers"
  2. put libmysql.dll (the MySQL library itself) and the OpenSSL v1.1 libraries, libcrypto-1_1 and libssl-1_1, in your application dir

Point 1 is easy to understand. I just move this one enter image description here

To here:

enter image description here

But how should I place the .dll files in point 2 ? My application folder...yes...but should I just drop them ctrl+c -> ctrl+v ?

euraad
  • 2,467
  • 5
  • 30
  • 51

1 Answers1

1

Please refer to the readme here: https://github.com/thecodemonkey86/qt_mysql_driver

  1. Download .zip folder acoording to your QT version
  2. put qsqlmysql.dll / qsqlmysqld.dll in application subdirectory "sqldrivers" (the folder within your qt version, eg. "QT/6.3.0/mingw_64/plugins/sqldrivers"
  3. put libmysql.dll (the MySQL library itself) and the OpenSSL v1.1 libraries, libcrypto-1_1 and libssl-1_1, in your application dir (the folder where your debug project is located)
  4. Rebuild your project (just remove your compiled project folder)

Should work now.

ratloser
  • 116
  • 1
  • 7