insecure password error with server that doesn't use old passwords

Asked by Jonathan Eisch

Hello, in trying to run the engines test from version 0.3.0 (after editing config.py), and I get this error:
jeisch@pub2% ./engines.py
Traceback (most recent call last):
  File "./engines.py", line 35, in <module>
    main(config)
  File "./engines.py", line 16, in main
    db = mysql.connector.Connect(**config)
  File "/home/jeisch/scripts/python/mysql/connector/__init__.py", line 45, in Connect
    return MySQLConnection(*args, **kwargs)
  File "/home/jeisch/scripts/python/mysql/connector/connection.py", line 366, in __init__
    self.connect(*args, **kwargs)
  File "/home/jeisch/scripts/python/mysql/connector/connection.py", line 411, in connect
    ssl=(ssl_ca, ssl_cert, ssl_key))
  File "/home/jeisch/scripts/python/mysql/connector/connection.py", line 449, in _open_connection
    self._charset)
  File "/home/jeisch/scripts/python/mysql/connector/protocol.py", line 350, in do_auth
    "Authentication with old (insecure) passwords "\
mysql.connector.errors.NotSupportedError: Authentication with old (insecure) passwords is not supported: http://dev.mysql.com/doc/refman/5.1/en/password-hashing.html

I get the same error trying to use 0.2.1. (except it doesn't try to use ssl, as expected)

My server reports:
SHOW VARIABLES LIKE 'old_passwords';
old_passwords OFF

SHOW VARIABLES LIKE 'version'
version 5.0.77-log

I'm not sure what I should test next. I'm a new user, so I haven't yet had a working configuration.

Thanks for any ideas.
-Jonathan

Question information

Language:
English Edit question
Status:
Solved
For:
MySQL Connector/Python Edit question
Assignee:
No assignee Edit question
Solved by:
Jonathan Eisch
Solved:
Last query:
Last reply:
Revision history for this message
Jonathan Eisch (jeisch) said :
#1

I tried another user of the same database, and that one worked just fine. It seems the user I tried the first time still used an old (short) hash. I wasn't aware of that this was a possibility (though further reading on the "Password Hashing in MySQL" does go into that subject in some depth).

Revision history for this message
Geert JM Vanderkelen (geertjmvdk) said :
#2

Jonathan,

Yes, if the password was pre-4.1, it wouldn't have worked either.
For the record, some pointers to MySQL Manual:
 http://dev.mysql.com/doc/refman/5.1/en/password-hashing.html
 http://dev.mysql.com/doc/refman/5.1/en/old-client.html

Cheers,
Geert

(Sorry about not replying sooner)