Deploying MySql program
-
Hello everyone
I have developed a 64-bit Qt Desktop application that uses MySQL.
Basically everything is working fine when running the program from QtCreator. The qsqlmysql driver is loaded together with the mysql driver.
When I prepare to deploy the project, then I am unable to load QMYSL
The error is as followed.QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMARIADB QMYSQL QODBC QPSQL
I am using qtwindeploy and I have the .exe file in a folder together with all the libraries.
I have tried to put the libmysql file next to the .exe file, but it is not working. I have tried to put it into the sqldrivers directory without luck either.Am I missing something obvious?
-
Hello everyone
I have developed a 64-bit Qt Desktop application that uses MySQL.
Basically everything is working fine when running the program from QtCreator. The qsqlmysql driver is loaded together with the mysql driver.
When I prepare to deploy the project, then I am unable to load QMYSL
The error is as followed.QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMARIADB QMYSQL QODBC QPSQL
I am using qtwindeploy and I have the .exe file in a folder together with all the libraries.
I have tried to put the libmysql file next to the .exe file, but it is not working. I have tried to put it into the sqldrivers directory without luck either.Am I missing something obvious?
See https://doc.qt.io/qt-6/sql-driver.html#qmysql
"When you distribute your application, remember to include libmysql.dll / libmariadb.dll in your installation package. It must be placed in the same folder as the application executable. libmysql.dll additionally needs the MSVC runtime libraries which can be installed with vcredist.exe"