Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > MySQLdb problems with named pipe connection on Windows 7?

Reply
Thread Tools

MySQLdb problems with named pipe connection on Windows 7?

 
 
John Nagle
Guest
Posts: n/a
 
      06-10-2010
MySQLdb won't connect to my MySQL 5.1 on on Windows 7.
This worked on Windows 2000, but of course I've had to
reinstall everything.

The MySQL command line client, "mysql", connects
to the database without problems.

Installed:

ActiveState Python 2.6 (Win32)
"mysql-essential-5.1.47.win32.msi"
"MySQL-python-1.2.2.win32.py2.6.exe"

MySQL is configured for connections over named pipes only; it's
not running as a TCP server. Is MySQLdb trying to use TCP for a local
connection? The MySQLdb documentation says that connections to
"localhost" on Windows will be made over named pipes. Does that
not work?

my.cnf reads

skip-networking
enable-named-pipe

# The Pipe the MySQL Server will use
socket=mysql

Error messages:

\python26\python
ActivePython 2.6.5.12 (ActiveState Software Inc.) based on
Python 2.6.5 (r265:79063, Mar 20 2010, 14:22:52) [MSC v.1500 32 bit
(Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb

C:\python26\lib\site-packages\MySQLdb\__init__.py:34:
DeprecationWarning: the sets module is deprecated
from sets import ImmutableSet
>>> db = MySQLdb.connect("localhost","root","????","???")

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\python26\lib\site-packages\MySQLdb\__init__.py", line 74, in
Connect
return Connection(*args, **kwargs)
File "C:\python26\lib\site-packages\MySQLdb\connections.py", line 170,
in __init__
super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError:
(2003, "Can't connect to MySQL server on 'localhost' (10061)")
>>>


John Nagle
 
Reply With Quote
 
 
 
 
Dennis Lee Bieber
Guest
Posts: n/a
 
      06-11-2010
On Thu, 10 Jun 2010 14:15:21 -0700, John Nagle <>
declaimed the following in gmane.comp.python.general:


> MySQL is configured for connections over named pipes only; it's
> not running as a TCP server. Is MySQLdb trying to use TCP for a local
> connection? The MySQLdb documentation says that connections to
> "localhost" on Windows will be made over named pipes. Does that
> not work?
>

I wouldn't be a tad surprised if M$ Win7 has implemented some
security/privilege scheme on named pipes such that cross process/user
access is blocked.

A quick Google shows that a similar problem crops up for users of M$
SQL Server
--
Wulfraed Dennis Lee Bieber AF6VN
HTTP://wlfraed.home.netcom.com/

 
Reply With Quote
 
 
 
 
John Nagle
Guest
Posts: n/a
 
      06-11-2010
On 6/10/2010 11:58 PM, Dennis Lee Bieber wrote:
> On Thu, 10 Jun 2010 14:15:21 -0700, John Nagle<>
> declaimed the following in gmane.comp.python.general:
>
>
>> MySQL is configured for connections over named pipes only; it's
>> not running as a TCP server. Is MySQLdb trying to use TCP for a local
>> connection? The MySQLdb documentation says that connections to
>> "localhost" on Windows will be made over named pipes. Does that
>> not work?
>>

> I wouldn't be a tad surprised if M$ Win7 has implemented some
> security/privilege scheme on named pipes such that cross process/user
> access is blocked.


The MySQL command line client can connect with the same privileges.
So that may not be the problem.

John Nagle
 
Reply With Quote
 
John Nagle
Guest
Posts: n/a
 
      06-11-2010
I reconfigured MySQL to allow local network connections, and
now MySQLdb works over TCP. It doesn't seem to be able to use
Windows 7 named pipes, although the "mysql" command line client can.
There may be a bug. This wouldn't be noticed unless MySQL
was configured without network connections, which is rare. I set
up MySQL that way on a development machine with a local MySQL instance.

John Nagle

On 6/11/2010 9:32 AM, John Nagle wrote:
> On 6/10/2010 11:58 PM, Dennis Lee Bieber wrote:
>> On Thu, 10 Jun 2010 14:15:21 -0700, John Nagle<>
>> declaimed the following in gmane.comp.python.general:
>>
>>
>>> MySQL is configured for connections over named pipes only; it's
>>> not running as a TCP server. Is MySQLdb trying to use TCP for a local
>>> connection? The MySQLdb documentation says that connections to
>>> "localhost" on Windows will be made over named pipes. Does that
>>> not work?
>>>

>> I wouldn't be a tad surprised if M$ Win7 has implemented some
>> security/privilege scheme on named pipes such that cross process/user
>> access is blocked.

>
> The MySQL command line client can connect with the same privileges.
> So that may not be the problem.
>
> John Nagle


 
Reply With Quote
 
Dennis Lee Bieber
Guest
Posts: n/a
 
      06-12-2010
On Fri, 11 Jun 2010 09:32:54 -0700, John Nagle <>
declaimed the following in gmane.comp.python.general:

> The MySQL command line client can connect with the same privileges.
> So that may not be the problem.
>

Was that client built with the exact same configuration as the
MySQLdb adapter?
--
Wulfraed Dennis Lee Bieber AF6VN
HTTP://wlfraed.home.netcom.com/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
No Module Named MySQLdb Error Sam Python 0 01-15-2009 05:20 PM
Re: ImportError: No module named MySQLdb Gabriel Genellina Python 0 04-08-2008 04:53 AM
named pipe in java Bruintje Beer Java 2 09-27-2005 09:37 PM
[named pipe] i wanna know about validate of pipe handle of client lee, wonsun C++ 1 11-02-2004 04:29 AM
Why does IO::Pipe::END generate an EXCEPT pipe message? lvirden@gmail.com Perl Misc 1 06-02-2004 02:17 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57