Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > connection with MySQL with Python interface

Reply
Thread Tools

connection with MySQL with Python interface

 
 
pengz1@netzero.com
Guest
Posts: n/a
 
      04-09-2004

Hi! All
When I tried to connect with MySQL database which run on XP from shell. I got following error message. Has anyone get similar error message and provide any suggestion? Thanks in advance.

Zhiyong


Traceback (most recent call last):
File "C:\Python22\databaseAccess.py", line 4, in ?
con=MySQLdb.connect(host="127.0.0.1",port=3306,use r="pengz",passwd="zhiy4318",db="e_retail_store")
File "C:\PYTHON22\Lib\site-packages\MySQLdb\__init__.py", line 63, in Connect
return apply(Connection, args, kwargs)
File "C:\PYTHON22\Lib\site-packages\MySQLdb\connections.py", line 115, in __init__
self._make_connection(args, kwargs2)
File "C:\PYTHON22\Lib\site-packages\MySQLdb\connections.py", line 41, in _make_connection
apply(super(ConnectionBase, self).__init__, args, kwargs)
OperationalError: (2003, "Can't connect to MySQL server on '127.0.0.1' (10061)")
Traceback (most recent call last):
File "C:\Python22\databaseAccess.py", line 4, in ?
con=MySQLdb.connect(host="127.0.0.1",port=3306,use r="pengz",passwd="zhiy4318",db="e_retail_store")
File "C:\PYTHON22\Lib\site-packages\MySQLdb\__init__.py", line 63, in Connect
return apply(Connection, args, kwargs)
File "C:\PYTHON22\Lib\site-packages\MySQLdb\connections.py", line 115, in __init__
self._make_connection(args, kwargs2)
File "C:\PYTHON22\Lib\site-packages\MySQLdb\connections.py", line 41, in _make_connection
apply(super(ConnectionBase, self).__init__, args, kwargs)
OperationalError: (1250, 'Client does not support authentication protocol requested by server; consider upgrading MySQL client')

__________________________________________________ ______________
The best thing to hit the Internet in years - NetZero HiSpeed!
Surf the Web up to FIVE TIMES FASTER!
Only $14.95/ month -visit www.netzero.com to sign up today!

 
Reply With Quote
 
 
 
 
Marco Bartel
Guest
Posts: n/a
 
      04-09-2004
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> Hi! All
> When I tried to connect with MySQL database which run on XP from shell. I got following error message. Has anyone get similar error message and provide any suggestion? Thanks in advance.
>
> Zhiyong
>
>
> Traceback (most recent call last):
> File "C:\Python22\databaseAccess.py", line 4, in ?
> con=MySQLdb.connect(host="127.0.0.1",port=3306,use r="pengz",passwd="zhiy4318",db="e_retail_store")
> File "C:\PYTHON22\Lib\site-packages\MySQLdb\__init__.py", line 63, in Connect
> return apply(Connection, args, kwargs)
> File "C:\PYTHON22\Lib\site-packages\MySQLdb\connections.py", line 115, in __init__
> self._make_connection(args, kwargs2)
> File "C:\PYTHON22\Lib\site-packages\MySQLdb\connections.py", line 41, in _make_connection
> apply(super(ConnectionBase, self).__init__, args, kwargs)
> OperationalError: (2003, "Can't connect to MySQL server on '127.0.0.1' (10061)")
> Traceback (most recent call last):
> File "C:\Python22\databaseAccess.py", line 4, in ?
> con=MySQLdb.connect(host="127.0.0.1",port=3306,use r="pengz",passwd="zhiy4318",db="e_retail_store")
> File "C:\PYTHON22\Lib\site-packages\MySQLdb\__init__.py", line 63, in Connect
> return apply(Connection, args, kwargs)
> File "C:\PYTHON22\Lib\site-packages\MySQLdb\connections.py", line 115, in __init__
> self._make_connection(args, kwargs2)
> File "C:\PYTHON22\Lib\site-packages\MySQLdb\connections.py", line 41, in _make_connection
> apply(super(ConnectionBase, self).__init__, args, kwargs)
> OperationalError: (1250, 'Client does not support authentication protocol requested by server; consider upgrading MySQL client')
>
> __________________________________________________ ______________
> The best thing to hit the Internet in years - NetZero HiSpeed!
> Surf the Web up to FIVE TIMES FASTER!
> Only $14.95/ month -visit www.netzero.com to sign up today!
>


Hi Zhiyong,
I think this error is raised by an incompatible clientlibrary shipped
with mysql. You have to know that a client needs to have a mysql-client
library and a mysql-shared library, for accessing a mysql-database.
Under windows I only used mysql with win2000 not with XP, but when i
remember right, the client, and the shared-library are not part of the
main mysql-package, and have to be downloaded and installed seperatly.

Maybe I helped you a little bit, becaus e the code of your program looks
fine.

CU
Marco

 
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
Using Python and Connecting to MySQL remotely WITHOUT MySQL installedon local computer dave Python 4 11-18-2010 04:19 AM
MySQL-python-1.2.2 install with no mysql washakie Python 4 01-15-2008 08:15 PM
ERROR CLOSING CONNECTION: mysql connection close johnny Python 1 12-08-2006 09:42 PM
"mysql.h: No such file or directory" when building MySQL-python francescomoi@europe.com Python 2 05-11-2005 03:12 PM
"Pure Python" MySQL module like Net::MySQL Ravi Python 6 07-21-2003 06:53 PM



Advertisments