Page 1 of 1
How to connect to a non-default shared memory base name?
Posted: Thu 01 Jul 2010 10:03
by skirsche
If I start the mysqld-nt.exe with these command line options:
Code: Select all
--skip-networking --shared-memory --shared-memory-base-name=MYSQL
this code will successfully connect to it:
Code: Select all
MyConnection.Options.Direct := False;
MyConnection.Options.Protocol := mpMemory;
MyConnection.Connect;
Now I have to set a different value for --shared-memory-base-name=. How do I tell a TMyConnection to connect to this instance?
Posted: Thu 01 Jul 2010 13:55
by Dimon
Now MyDAC does not provide such functionality, but we will support it in the next build.
Posted: Fri 02 Jul 2010 07:01
by skirsche
Thanks!
Posted: Tue 07 Dec 2010 08:56
by skirsche
The History.html of Version 5.90.0.60 says "Added ability to set shared-memory-base-name for the mpMemory protocol", but I can't figure out how to use it.
Which property do I have to modify to set the shared-memory-base-name?
Posted: Tue 07 Dec 2010 14:04
by Dimon
To set shared-memory-base-name you should specify it in the TMyConnection.Server property separated by a comma, like this:
Code: Select all
MyConnection.Server := 'server,shared_memory_base_name';
Unicode-MyDAC
Posted: Mon 23 May 2011 09:34
by skirsche
Setting the shared-memory-base-name like this:
Code: Select all
MyConnection.Server := 'localhost,MYSQL';
works fine with Delphi 7, but raises EMyError 'Can't open shared memory; client could not request event (2)' on Delphi 2010. Both MyDAC 5.90.0.60 and 6.10.0.7 behave the same.
I can connect to the default instance from Delphi 2010 by leaving MyConnection.Server empty.
Do I have to use a different TMyConnection.Server value for Unicode-MyDAC?
Posted: Thu 26 May 2011 06:40
by AndreyZ
Thank you for the information. We have reproduced this problem and fixed it. This fix will be included in the next MyDAC build.