[QMYSQL] connection problem
Hi all!
I'm using QT 4.3.0 and MySQL Server 4.1. I'm trying to build the MySQL plugin using "Building the QMYSQL plugin on Windows using MinGW" tutorial:
http://wiki.qtcentre.org/index.php?t...ws_using_mingw
everything goes fine until step 5: "Run make - this should build the qsqlmysql.dll and libqsqlmysql.a files in the %QTDIR%/plugins/sqldrivers directory." Indeed, running make creates in the %QTDIR%/plugins/sqldrivers some files, but their names are "qsqlmysql4.dll" and "libqsqlmysql4.a". But I guess it's not a big problem, so I copy the libmysql.dll file from the MySQL installation's bin directory to a directory %QTDIR%/bin, and run
the sqlbrowser demo. I can see QMYSQL in the combobox, so i fill blank spaces (database name, username, etc.) to connect - unfortunately i get the message "Can't connect to MySQL server on 'my.host.name' (10061) QMYSQL: Unable to connect". Could anyone help me with that? I think the problem might be in the libqsqlmysql4.a and libqsqlmysqld4.a files - when I open
HKEY_CURRENT_USER\Software\Trolltech\OrganizationD efaults and look into "Qt Plugin Cache 4.3.false" there are two registry keys for libqsqlmysql4.a and libqsqlmysqld4.a files, where values are:
Code:
0
1
unknown
2007-06-22T20:19:06
instead of:
Code:
40300
0
Windows mingw release full-config
2007-06-19T23:38:29
for other keys (qsqlmysql4.dll and qsqlmysqld4.dll)...any clue? When I install MySQL 5 i don't even see QMYSQL in the combobox...
On the other hand, when I try to connect with mysql at localhost everything works fine (I use 'localhost' as hostname, 'mysql' as database name, 'root' as username and 'password' as password) So i guess there is no problem with QMYSQL plugin. The problem shows when I try to connect with database on another server. I've no idea why :( Has anyone encountered similiar problems? I would appreciate any help!
Re: [QMYSQL] connection problem
Quote:
Originally Posted by
chaos_theory
On the other hand, when I try to connect with mysql at localhost everything works fine (I use 'localhost' as hostname, 'mysql' as database name, 'root' as username and 'password' as password) So i guess there is no problem with QMYSQL plugin. The problem shows when I try to connect with database on another server.
Did you remember to grant your user right to connect from a remote host?
http://dev.mysql.com/doc/refman/4.1/...ing-users.html
Re: [QMYSQL] connection problem
Quote:
Originally Posted by
jacek
Thanks a lot, Jacek!
I guess that was a problem - in the COLUMN_PRIVILEGES table, the GRANTEE option is set to 'user'@'localhost', which means I can access to MySQL database only from this host (am I right?).
Unfortunately, the IS_GRANTABLE option is set to NO, so I'll have to talk to administrator...or connect to host first, and then connect to MySQL database. Thanks again for solving my problem!
Re: [QMYSQL] connection problem
Re: [QMYSQL] connection problem
Quote:
Originally Posted by
chaos_theory
Next time, please, don't post the same question in more than one thread.
Re: [QMYSQL] connection problem