Newbie MySQLdb / MySQL version problem, I think

Dave Merrill dmerrillq at usaq.netq
Sun Nov 28 13:45:55 EST 2004


Sorry for the newbness... Win2K, Python 2.3.3, MySQL 4.1.7. Downloaded and
extracted MySQL-python-1.0.0.win32-py2.3.zip. Put the whole extracted
directory into C:\Program Files\Python23\Lib\site-packages\ and renamed it
to "MySQLdb.

MySQLdb.__version__ returns '1.0.0', so I think it's installed ok.

However, I still can't connect, and I just want to confirm my guess on what
the problem is, which is that MySQLdb doesn't yet support MySQL 4.1. I'd
hoped that all that meant was that it wouldn't support any of 4.1's new
features, but it appears this combination may be completely non-functional.
Test and results below.

Has anyone else tried this?

Thanks,

Dave Merrill


TEST CODE (from http://www.kitebird.com/articles/pydbapi.html):
--------------
import MySQLdb
conn = MySQLdb.connect (host = "localhost",
                       user = "test_user",
                       passwd = "secret",
                       db = "test_db")
cursor = conn.cursor ()
cursor.execute ("SELECT VERSION()")
row = cursor.fetchone ()
print "server version:", row[0]
cursor.close ()
conn.close ()
--------------

RESULT:
--------------
Traceback (most recent call last):
  File "C:\PROGRA~1\PYTHON23\Lib\site-packages\sm\scriptutils.py", line 49,
in run
    exec codeObject in mainDict
  File "<source>", line 9, in ?
  File "C:\PROGRA~1\PYTHON23\lib\site-packages\MySQLdb\__init__.py", line
64, in Connect
    return apply(Connection, args, kwargs)
  File "C:\PROGRA~1\PYTHON23\lib\site-packages\MySQLdb\connections.py", line
116, in __init__
    self._make_connection(args, kwargs2)
  File "C:\PROGRA~1\PYTHON23\lib\site-packages\MySQLdb\connections.py", line
41, in _make_connection
    apply(super(ConnectionBase, self).__init__, args, kwargs)
OperationalError: (1251, 'Client does not support authentication protocol
requested by server; consider upgrading MySQL client')
--------------







More information about the Python-list mailing list