Connection without server and port?

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Nuno Mendes

Connection without server and port?

Post by Nuno Mendes » Fri 01 Jul 2005 09:22

MyConnection.Server := '';
MyConnection.Port := 0;
MyConnection.Database := database;
MyConnection.Username := username;
MyConnection.Password := password;
MyConnection.Connected := true;

if I use the code above the connection attempt is sucessfull on a localhost. Is this the way it should be?

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Fri 01 Jul 2005 14:20

Yes, if server and port aren't specified a connection will be established with localhost:3306

Nuno Mendes

Post by Nuno Mendes » Fri 01 Jul 2005 15:29

ok Thx!

Post Reply