Unsolved Files needed for mysql for client devices
-
I have succesfully configured database from cpanel and everything is working fine in development machine(my machine). I send it to client and Got the error that driver is not loaded.
I used this link to configure mysql database
https://github.com/thecodemonkey86/qt_mysql_driver/releases/tag/qmysql_5.12.8
What should I do to make it work??
Should I copy files there If so Which files should I copy
I had copied 5 files to c:/windows
I can't frequently request client to test it So can you guys ( @JonB @jsulm @mrjj @Christian-Ehrlicher ) help?
-
@Thank-You said in Files needed for mysql for client devices:
Should I copy files there If so Which files should I copy
You need to copy mysqlclient.dll (not lib!) file together with your app. You can use https://www.dependencywalker.com/ tool to check what is needed.
To test locally you could use a virtual machine with Windows without any Qt and MySQL stuff installed. -
@jsulm My computer doesn't support virtual machine so I tried to search mysqlclient.dll But could not found in the whole machine
dir mysqlclient.dll /s
Should I install connector in client machine ?
-
Hi,
Do not copy files in C:/Windows. It's a really bad habit that some applications developers used rather than properly deploy their application.
.lib files won't help you as they are only use to compile your application. You need to deploy the connector dll along your application.
If your application runs successfully on your development machine, it means that you have all .dlls at hand. As suggested by @jsulm, use something like Dependency Walker to find out where the plugin gets its dependencies.
-
Everything is working as excepted except connection to database(mysql)
But there is not such thing that you said ? -
@Thank-You
I believe that the fact that items with64
are marked in red indicates that it is picking up 64-bit DLLs as dependencies of 32-bit DLLs, which won't work. But I stand to be corrected on this.Somewhere else (top or bottom) of that view in Dependency Walker, does it not give you a warning about mixing 32- & 64-bit DLLs?
-
You are checking the QtSql library. What you need to check is the MySQL plugin.
-
@SGaist These are only the lists.
The only which has sql keyword is this list.
I have just minimized(closed) other things. -
You need to go into the plugins folder.