11 messages in com.mysql.lists.dotnetRe: Has shared memory ever worked? (w...| From | Sent On | Attachments |
|---|---|---|
| Homam S.A. | 11 Jan 2005 13:20 | |
| John L.Utz III | 11 Jan 2005 14:06 | |
| Homam S.A. | 11 Jan 2005 17:18 | |
| John L.Utz III | 11 Jan 2005 17:50 | |
| Reggie Burnett | 13 Jan 2005 14:15 | |
| Homam S.A. | 13 Jan 2005 17:53 | |
| Homam S.A. | 13 Jan 2005 17:59 | |
| Darren Hill | 13 Jan 2005 18:36 | |
| Mike Hillyer | 13 Jan 2005 20:32 | |
| Homam S.A. | 13 Jan 2005 21:31 | |
| Reggie Burnett | 16 Jan 2005 07:52 |
| Subject: | Re: Has shared memory ever worked? (was: Shared memory and ASP.NET web services)![]() |
|---|---|
| From: | Mike Hillyer (mhil...@mysql.com) |
| Date: | 01/13/2005 08:32:29 PM |
| List: | com.mysql.lists.dotnet |
One word: Speed.
Mike
Darren Hill wrote:
This will sound silly, but what's the advantage of using shared memory ... Or is
that for another list?
-----Original Message-----
From: "Homam S.A." <homa...@yahoo.com>
Date: Thu, 13 Jan 2005 17:59:25
To:Reggie Burnett <reg...@mysql.com>, dot...@lists.mysql.com
Subject: RE: Has shared memory ever worked? (was: Shared memory and ASP.NET web
services)
By the way, I also tried added the following line to my.ini and restarted MySQL, but it didn't work:
shared-memory-base-name=MySQL
--- "Homam S.A." <homa...@yahoo.com> wrote:
Hi Reggie,
I added "shared memory name=MYSQL", but I'm still getting the same error. I also tried "shared memory base name=MYSQL" and it complained that the keyword isn't supported. So "shared memory name" is the correct one. I also tried "MySQL" and "mysql", thinking that may be case matters, to no avail. I keep getting "Failed to open shared memory connection".
Do I have to configure my SQL somehow to listen to shared memory for the name "MYSQL"?
Thanks,
Homam
--- Reggie Burnett <reg...@mysql.com> wrote:
Homam
There is a bug related to shared memory but it's a little tricky to find. :-)
The problem you are seeing is another bug that has
a
workaround. In 1.0.3, the connector doesn't default the shared memory
name
to MYSQL. To get shared memory working, you have to give "shared memory name=MYSQL" on the connect string.
This has been corrected for 1.0.4. In the future, you will only need to give this option if you use a non-standard shared memory name.
-reggie
-----Original Message----- From: Homam S.A. [mailto:homa...@yahoo.com] Sent: Tuesday, January 11, 2005 7:19 PM To: dot...@lists.mysql.com Subject: Has shared memory ever worked? (was:
Shared memory and ASP.NET
web services)
Thanks John. Of course I'm running on the same machine; otherwise "shared memory" doesn't make
sense.
I take what I said in the original post back.
The
shared memory protocol never worked for me. I
was
mistaken. It doesn't work for me whether I'm
using
ASP.NET, a console application, or a windows
forms
application.
I added the ASPNET account to the local
administrators
group and it didn't work. Then I tried to run a console application and it gave me the same
error.
I wonder if the shared memory protocol works
with
anyone, and what kind of connection string they
used.
Here's the connection string I used:
"server=localhost;user id=myuserid; password=mypassword; database=mydb;
protocol=memory;"
It doesn't work whether I disabled or increase
the
default timeout.
Here's the stack trace:
Unhandled Exception: MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts ---> MySql.Data.MySqlClient.MySqlExc eption: Failed to open shared memory connection at
MySql.Data.MySqlClient.SharedMemoryStream.GetConnectNumber(Int32
timeOut) at
MySql.Data.MySqlClient.SharedMemoryStream.Open(Int32
timeOut) at MySql.Data.MySqlClient.NativeDriver.Open() --- End of inner exception stack trace --- at MySql.Data.MySqlClient.NativeDriver.Open() at
MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection()
at
MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
at
MySql.Data.MySqlClient.MySqlPool.GetConnection()
at
MySql.Data.MySqlClient.MySqlPoolManager.GetConnection(MySqlConnectionStrin
g settings) at
MySql.Data.MySqlClient.MySqlConnection.Open()
at
TestMySQLSharedMemroy.SharedMemoryTest.Main(String[]
args) in c:\testmysqlsharedmemroy\class1.cs:line
30
Homam
--- "John L.Utz III" <jo...@utzweb.net> wrote:
Hello;
At Tue, 11 Jan 2005 13:21:06 -0800 (PST), Homam S.A. wrote:
I'm trying to use the shared memory protocol
in an
ASP.NET web service, but I'm getting the
following
error:
"Unable to connect to any of the specified
MySQL
hosts
--> Failed to open shared memory connection"
Which host? is it on the same box as the
WebService?
If I remove the the "protocol=memory" from
the
connection string, it works fine. If I use
the
same
connection string in a windows forms or a
console
application, the shared memory connection
works
fine.
So it seems to me it's a security problem
with
the
ASP.NET account (ASPNET).
well, you have a way to test this using runas
to
execute your console app or your winform app using the ASPNET account....hmmm...except that you would need the *password* for the ASPNET account and i
dont
know what that is or how to find that out.
so, then the fallback would be to create a new
local
user with the same permission level as the ASPNET account and see
if
you can use runas to run your console app or winform with that account
and
get a successfull connection
the other thing you could try would be to temporarily escalate the process by using a different account other than ASPNET.
here's
the msdn:
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/secmod/html/secmod15.asp
Has anybody used the shared memory protocol
from
ASP.NET, and if so, what kind of permissions
did
you
grant to the ASPNET account to get it to
work?
i have not used this protocol because i dont currently develop with MySQL, i am a SQLServer guy.
but ASPNET permissioning is uniformly
obnoxious
across all db's :-) and this is the process that i have used with my
current
c#
project to figure out what is going wrong from a permissons perspective.
HTH!
johnu
I appreciate your help!
Homam
__________________________________ Do you Yahoo!? Read only the mail you want - Yahoo! Mail
SpamGuard.
http://promotions.yahoo.com/new_mail
-- MySQL on .NET Mailing List For list archives:
To unsubscribe:
http://lists.mysql.com/dotnet?unsub=jo...@utzweb.net
-- MySQL on .NET Mailing List For list archives:
To unsubscribe:
http://lists.mysql.com/dotnet?unsub=homa...@yahoo.com
__________________________________ Do you Yahoo!? Yahoo! Mail - now with 250MB free storage. Learn
more.
http://info.mail.yahoo.com/mail_250
-- MySQL on .NET Mailing List For list archives: http://lists.mysql.com/dotnet To unsubscribe:
http://lists.mysql.com/dotnet?unsub=reg...@mysql.com
__________________________________ Do you Yahoo!? All your favorites on one personal page – Try My Yahoo! http://my.yahoo.com
-- MySQL on .NET Mailing List For list archives: http://lists.mysql.com/dotnet To unsubscribe:
http://lists.mysql.com/dotnet?unsub=homa...@yahoo.com
__________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo
-- Mike Hillyer, Technical Writer MySQL AB, www.mysql.com Office: +1 403-380-6535 Mobile: +1 403-330-0870
"The Open Source movement has become a major force across the software industry, and MySQL is the world's most popular open source database." --Fortune Magazine




