Newbie MySQLdb / MySQL version problem, I think

D

Dave Merrill

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')
--------------
 
D

Dave Merrill

Hmmm... I would try 1.1.7, except that there's no win32 compile for it, and
wimp that I am, I don't have a C compiler or know much about using one.

If anyone has compiled this release for win32, I'd appreciate it if they
could post it.

Dave Merrill
 
D

deelan

Dave said:
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?
i'm under the impression that binary 1.0.0 can only connect to 4.0 or
3.x mysql server installations.

there's must something written on the docs, IIRC it depends
on which version of mysql client lib the mysqldb has been compiled
against.

since the v1.0.0 comes pre-complied on windows i think this is
the problem.

bye.

--
 
L

Leon

new version MySQL use new Password encode .....
you can use ¡upassword()¡v(modify user table)¡Ato change new password encode
to old password......

good luck ^^

---by Leon--
 
T

Tim Williams

Dave Merrill said:
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')
--------------


I had a similar problem and found this thread:

http://groups.google.com/groups?hl=en&lr=&[email protected]

I changed the user's password using OLD_PASSWORD() and now it works
for me.

HTH.
 
D

Dave Merrill

Thanks Allastair, Leon, Tim, anyone else I missed. Bingo, that was it.

I didn't even try looking at mysql.com, duh. In my defense (;-), I'd already
spent a bunch of time in incompatible version hell with other things, so I
was (too) ready to think it either wouldn't work period, or I'd borked it up
somehow. Bless the problems you can fix, easily, even...

Dave Merrill
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top