PDA

View Full Version : QT/mySQL deployment issue


smtgra011
29th June 2007, 11:37
Hi

I'm having a bit of trouble with deploying a QT app that connects to a mySQL database.

A bit of info:
QT 4.3.0 (Windows Open Source Edition)
mySQL 5

It works fine on my computer but as soon as I move it to a different computer that doesn't have QT or mySQL installed it fails to connect. The GUI comes up but then there will be no connection. I have attempted to use addLibraryPath() but that has not succeeded.

Any suggestions would be greatly appreciated.

Thanks
Graeme

wysota
29th June 2007, 11:58
Please search the forum before asking question that have been answered several times.
A simple search for MySQL+problem will reveal relevant threads.

smtgra011
29th June 2007, 12:24
I have done so and, so far, have had no success.

Following your advice in another thread let me layout what I have attempted:

My directory structure looks like this:
/Working Dir
---bd.exe
---mingwm10.dll
---qtcore4.dll
---qtgui4.dll
---qtsql4.dll
---qtdesigner4.dll
---libmysql.dll
---/sqldrivers
....---qsqlmysql.dll

When I run it on my computer (with QT and mySQL installed) it runs fine, but if I try on another computer with neither of those installed then the program runs, but does not connect as far as I can see as no data appears.

I look forward to a response.
Graeme

jacek
29th June 2007, 22:50
but if I try on another computer with neither of those installed then the program runs, but does not connect as far as I can see as no data appears.
What does QSqlDatabase::drivers() return? Also make sure that the user has privilege to connect from a remote host.

wysota
1st July 2007, 21:31
And that there is no firewall that may block access.