I started up my local MYSQL server with the shared memory protocol turned on.
How can I connect to my server with ZeosLib? Where do I specify that it is using shared-memory?
I am using Lazarus(freepascal), although the directions would be the same for Delphi (probably).
Even if the
TZConnectionhas no connection string property you can set the additional connection parameters inTZConnection.Properties.I presume you run your MySQL server this way
To enable your shared memory connection you might try to add the following configuration lines into the property
TZConnection.Propertiesat design time in Object Inspector.Note that the
protocolmust be set as it is andshared-memory-base-nameto the same value as you used in the command line parameter. The default value is MYSQL so if you omit the parameter in command line then you should change the following MyMemoryDB values to MYSQL.So in
TZConnection.Propertiesproperty try to add these two linesor at runtime in the
TZConnection.BeforeConnectevent handler useHope this will help you somehow. I haven’t tested it because I don’t have the proper environment.