I have MySQL 5.1 installed on my Windows 2000, Pentium IV 1.6Ghz 512Mb, machine and I'm using the ZeosLib 6.6.4 (stable) components for Delphi 6 to connect my database.
The components work great! Thanks all for this great package! But I'm having an annoying problem. Whenever I call connect from my ZConnection component to work with one of my databases (very small, 1 table, < 100 rows) it takes up to 30 seconds to execute.
I was able to trace the slow code down to this command:
ZDbcMySQL.pas, line 457
All I configured was user, password, hostname (localhost), port (3306) and protocol (mysql-5 or mysql). I know that all of these are correct because I can normally connect to my MySQL database using other means, i.e. EMS MySQL Manager Lite, MySQL command line client, etc. The problem also occurs when executing the example applications that came with the component.{ Connect to MySQL database. }
if FPlainDriver.RealConnect(FHandle, PChar(HostName), PChar(User),
PChar(Password), PChar(Database), Port, nil,
ClientFlag) = nil then
When connecting to my databases from other programs, like the ones mentioned above the connection is instantaneous. Only from my own program, using ZeosLib TZConnection that the actual connection takes this very unusual time.
I'm sure I've done something wrong, but I would appreciate alot your help on solving this issue.
Thank you very much!