Using Python 3.3.2 on Windows and PyMySQL 0.6, we receive password
denied messages from the MySQL server.
The Username/password works correctly with Python 3.1 and an older
version of PyMySQL, as well as with the phpMyAdmin web interface to the
DB server.
The database server is MySql 5.0.95, Protocol Version 10. MySQL charset:
UTF-8 Unicode (utf8). The "old passwords" variable is set to off. (two
years ago we had to fix how old passwords were handled, but I believe
that the DB server is now upgraded and using the new password hashing
scheme...)
I suspect this may be a unicode vs non-unicode string handling/encoding
issue, and was wondering if anybody else had ran into this problem with
python 3.3 and MySQL 5? (Or if you had tested against that combination?)
It may be that Python 2.6/2.7 don't have the same issues...
Jay
Traceback (most recent call last):
File "/usr/lib/python3.3/site-packages/pymysql/connections.py", line
798, in _connect
self._request_authentication()
File "/usr/lib/python3.3/site-packages/pymysql/connections.py", line
938, in _request_authentication
auth_packet.check_error()
File "/usr/lib/python3.3/site-packages/pymysql/connections.py", line
374, in check_error
raise_mysql_exception(self.__data)
File "/usr/lib/python3.3/site-packages/pymysql/err.py", line 117, in
raise_mysql_exception
_check_mysql_exception(errinfo)
File "/usr/lib/python3.3/site-packages/pymysql/err.py", line 110, in
_check_mysql_exception
raise errorclass(errno,errorvalue)
pymysql.err.OperationalError: (1045, "Access denied for user
'cs2316'@'
lawn-128-61-22-195.lawn.gatech.edu
<
http://lawn-128-61-22-195.lawn.gatech.edu>' (using password: YES)")
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/michael/code/contacts_pymysql.py", line 70, in <module>
db = connectMySQL("
academic-mysql.cc.gatech.edu
<
http://academic-mysql.cc.gatech.edu>", "cs2316", "q8tRegu5")
File "/home/michael/code/contacts_pymysql.py", line 6, in connectMySQL
user = username, db='cs2316db')
File "/usr/lib/python3.3/site-packages/pymysql/__init__.py", line 88,
in Connect
return Connection(*args, **kwargs)
File "/usr/lib/python3.3/site-packages/pymysql/connections.py", line
635, in __init__
self._connect()
File "/usr/lib/python3.3/site-packages/pymysql/connections.py", line
819, in _connect
2003, "Can't connect to MySQL server on %r (%s)" % (self.host, e))
pymysql.err.OperationalError: (2003, 'Can\'t connect to MySQL server on
\'
academic-mysql.cc.gatech.edu <
http://academic-mysql.cc.gatech.edu>\'
((1045, "Access denied for user
\'cs2316\'@\'
lawn-128-61-22-195.lawn.gatech.edu
<
http://lawn-128-61-22-195.lawn.gatech.edu>\' (using password: YES)"))')