connection with MySQL with Python interface

Discussion in 'Python' started by pengz1@netzero.com, Apr 9, 2004.

  1. Guest

    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,user="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,user="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!
     
    , Apr 9, 2004
    #1
    1. Advertising

  2. Marco Bartel Guest

    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,user="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,user="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
     
    Marco Bartel, Apr 9, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ravi
    Replies:
    6
    Views:
    1,410
    Suchandra Thapa
    Jul 21, 2003
  2. Rick Morrison

    Python Interface to MySQL 4.1 / 5.0

    Rick Morrison, Feb 3, 2004, in forum: Python
    Replies:
    0
    Views:
    281
    Rick Morrison
    Feb 3, 2004
  3. Replies:
    2
    Views:
    6,196
  4. johnny
    Replies:
    1
    Views:
    795
    Jerry Hill
    Dec 8, 2006
  5. Roy Smith

    Pure Python interface to MySQL?

    Roy Smith, Oct 7, 2008, in forum: Python
    Replies:
    8
    Views:
    1,778
    Gerhard Häring
    Oct 7, 2008
Loading...

Share This Page