[Qt-interest] loading sql plug in

Chris W qtinterest at psychogeeks.com
Thu Oct 1 04:09:30 CEST 2009


Yuvaraj R wrote:
> if with out installing mysql, can't we use the mysql sql database in another
> systems ?.

Don't confuse the MySQL database server with the MySQL database client.

If you wish to have an actual MySQL database server hosted on a machine
you will need to have MySQL installed on that machine.

If you wish to access a MySQL server from a machine using a Qt
application then you will need the Qt MySQL plugin, the MySQL client
library, the QT libraries (for QtSql etc.) installed with the
application.  Then the connection from the application to the MySQL
server is possible by supplying the correct server name, user and
password.  You should not need a full MySQL installation on the client
machine.

Your development machine would typically have both a MySQL server and
client applications (Qt or other).

> How do i open my Sql database..

With code along the lines you have shown and correct parameters.

> I traced available databases .. there sql database is available..but i could
> not able to open it..
> 
> Even i tried with sql browser project .. there also i could not able to open
> it

If you cannot connect from the client machine to the server with MySQL
command-line or third-party tools then Qt won't be able to either.
This is not a Qt problem.  Could be networking, firewalls, permissions,
incorrect connection details ...

Regards,

Chris



More information about the Qt-interest-old mailing list