Page 1 of 1
					
				Shared Memory connections
				Posted: Wed  12 Jan 2005 01:52
				by Guest
				How do you configure the data source with a shared memory protocol. I tried adding "potocol=memory" to the connection string, but I get the following exception:
Wrong or unknown protocol
Also, do I have to do something special with MySQL to make it accept Shared Connections, and if so, how do I do that?
Thanks!
			 
			
					
				Re: Shared Memory connections
				Posted: Fri  14 Jan 2005 07:30
				by Oleg
				Try also to add Direct = false in your connection string.
In Direct mode shared memory protocol isn't supported.
			 
			
					
				
				Posted: Fri  14 Jan 2005 22:07
				by Guest
				Thank you so much! It works great now  

 
			
					
				
				Posted: Fri  14 Jan 2005 22:14
				by Guest
				Anonymous wrote:Thank you so much! It works great now  

 
Well thank you anyway, but nope, it didn't work  

  I was just desperate to get it to work by any means that I forgot to add "protocol=memory" to the connection string.
So, with this connection string, it still does NOT work:
"server=localhost;uid=myuid; pwd=mypwd; database=mydb; protocol=memory; direct=false"
I'm getting a different exception now:
Unhandled Exception: Can't open shared memory; client could not create request event (2) 
			
					
				
				Posted: Fri  14 Jan 2005 22:25
				by Guest
				It's now failing on the Connection.Open(). Here's the stack trace (due to the obfuscator, you can hardly tell what's going on):
Code: Select all
   at CoreLab.MySql.w.e()
   at CoreLab.MySql.w.a(String A_0, String A_1, String A_2, String A_3, Int32 A_4, Int32 A_5, MySqlProtocol A_6, Boolean A_7)
   at CoreLab.MySql.w..ctor(h A_0)
   at CoreLab.MySql.f.a(DbConnectionOptions A_0, Object A_1, DbConnectionBase A_2)
   at CoreLab.Common.DbConnectionFactory.a(DbConnectionPool A_0, DbConnectionOptions A_1)
   at CoreLab.Common.DbConnectionPool.a()
   at CoreLab.Common.DbConnectionPool.GetObject()
   at CoreLab.Common.DbConnectionFactory.a(DbConnectionBase A_0)
   at CoreLab.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
   at CoreLab.Common.DbConnectionBase.Open()
   at CoreLab.MySql.MySqlConnection.Open()
   at TestMySQLSharedMemroy.SharedMemoryTest.Main(String[] args) in c:\class1.cs:line 33
 
			
					
				
				Posted: Mon  17 Jan 2005 08:50
				by Oleg
				Try to start your MySQL server with the --shared-memory option.
			 
			
					
				
				Posted: Mon  17 Jan 2005 19:55
				by Guest
				Oleg wrote:Try to start your MySQL server with the --shared-memory option.
I added "shared-memory" to my.ini and restarted the server. It still doesn't work.
 
			
					
				
				Posted: Tue  18 Jan 2005 08:38
				by Oleg
				Most likely your server doesn't support shared memory protocol at all.
Try to find out it.