Issue with Qt Application Connecting to MySQL Database - "Drivers Not Loaded"
-
Hello everyone,
I hope you're doing well. I'm facing a problem with my Qt application, and I'm seeking some guidance to resolve it.
Description:
I have developed a Qt application that successfully connects to a MySQL database and performs various operations. During the development phase, I used the "windeploy" tool to deploy the application, and it worked flawlessly on my computer. However, when I shared it with others, they encountered an issue. The program fails to connect to the database and displays an error message stating, "drivers not loaded."Possible Cause:
After some investigation, it seems that the problem might be related to missing or incorrect database drivers on the users' machines. When deploying the application, I probably didn't include all the necessary dependencies, which are crucial for establishing the connection to the MySQL database.Request for Assistance:
I am seeking your help in identifying the exact steps I need to take to ensure the application can successfully connect to the MySQL database on any machine. What additional files or configurations do I need to include during deployment to address this issue?Please guide me through the process of deploying a Qt application that uses a MySQL database correctly. Your expertise and advice would be immensely appreciated.
Thank you all for your time and support.
-
Use Dependency Walker or it's successor Dependencies to find out what dlls the Qt mysql plugin needs. Most likely it's
libmysql.dll
and it's dependent dlls (openssl libs)