mysql connect named pipe on windows

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
nyuszis
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 17.12.2011, 22:42

mysql connect named pipe on windows

Post by nyuszis »

Hi!
I use Zdbconnection to connect mysql
please write example properties how to connect named pipe protocol to my server
mysql.exe connected to server right
any help is welcome
nyuszis
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 17.12.2011, 22:42

Post by nyuszis »

The Solution is next:
I change zdbcmysql.pas on line 457

Code: Select all

if FPlainDriver.RealConnect(FHandle, PChar(HostName), PChar(User),
PChar(Password), PChar(Database), Port, nil,
ClientFlag) = nil then
to

Code: Select all

if FPlainDriver.RealConnect(FHandle, PChar(HostName), PChar(User),
PChar(Password), PChar(Database), Port, 'MySQL',
ClientFlag) = nil then
If the HostName variable is '.' then connect to MySQL named pipe (it is default)
else connect TCP

thanks myself :)
papelhigienico
Expert Boarder
Expert Boarder
Posts: 113
Joined: 06.10.2006, 14:41
Location: Chapecó - Santa Catarina
Contact:

Post by papelhigienico »

And TCP/IP Connections, after this change, keeps the same behavior?
nyuszis
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 17.12.2011, 22:42

Post by nyuszis »

papelhigienico wrote:And TCP/IP Connections, after this change, keeps the same behavior?
The TCP/IP connect right if the HostName is the correct Computer name or ip and not '.'
papelhigienico
Expert Boarder
Expert Boarder
Posts: 113
Joined: 06.10.2006, 14:41
Location: Chapecó - Santa Catarina
Contact:

Post by papelhigienico »

What's your OS? Windows? I'm asking this because I don't have how test it on Windows, I can test this change only on Linux.
nyuszis
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 17.12.2011, 22:42

Post by nyuszis »

papelhigienico wrote:What's your OS? Windows? I'm asking this because I don't have how test it on Windows, I can test this change only on Linux.
Sorry, yes the os is Windows. And mysql run the next parameter:
--enable-named-pipe --socket=MySQL
The named pipe used only in localhost but the firewall not blocked the connection. Probably faster.
papelhigienico
Expert Boarder
Expert Boarder
Posts: 113
Joined: 06.10.2006, 14:41
Location: Chapecó - Santa Catarina
Contact:

Post by papelhigienico »

nyuszis, Can you see if this topic helps you: http://zeos.firmos.at/viewtopic.php?t=3318
Post Reply