debugging connection to mysql from python script using MySQLdb
- by timpone
I am a python newbie and have a python 2.5 script that is using MySQLdb to connect on OS X 10.5.8. I haven't been able to succesfully connect to the database of interest with this. However, I am able to connect using php's mysqli and also via the mysql cli interface.
I get the error:
File "build/bdist.macosx-10.5-i386/egg/MySQLdb/connections.py", line 188, in __init__
_mysql_exceptions.OperationalError: (1045, "Access denied for user 'arc_development'@'localhost' (using password: YES)")
On my linux box which has the same mysql perms, the script works fine logging in. On my OS X laptop, I am able to create a database named test_python which bypasses mysql authentication scheme. This makes me think that issues like 32bit / 64bit incompatabilities aren't occuring.
If I turn on the query log, I get access denied:
100610 20:56:55 4 Connect Access denied for user 'arc_development'@'localhost' (using password: YES)
I'm a little bit at a loss to what to do next. Is there any way I can specify in the general log or binary log to get the actual password set on the connection string? How about writing out from connections.py file the value (although not sure how I'd do that)?
thanks