PORT NUMBER ISSUE

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

PORT NUMBER ISSUE

Post by Alex7 » Fri 03 Feb 2006 16:04

i want to use a diferent port number on my SQL Connection. I am using Delphi's 2005 dbexpress.
my mysql server is runing on port 3307
how should i connect the sql connection on this port instead of 3306?
I tried on Params list to add Port=3307 but it isn'y working.
Thank you.

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

Post by Ikar » Mon 06 Feb 2006 09:59

You can set port number in two different ways:
- after server name delimited by colon, for example SQLConnection.Params.Add('HostName=MyServer:3306');
- using 'Server Port' parameter: SQLConnection.Params.Add('Server Port=3306');

Post Reply