An mysql-python tutorial?

Dfenestr8 chrisdewinN0SPAM at yahoo.com.au
Sat Jan 29 13:05:53 EST 2005


On Sat, 29 Jan 2005 06:41:37 +0000, Kartic wrote:

[snip]
> And here is one more site, good stuff here too:-
> http://www.kitebird.com/articles/pydbapi.html
> 

Hi.

I followed the instructions there, tried out the test script they
recommend. 

Can you tell me why this command, in the python interpreter:

>>>conn = MySQLdb.connect (host = "localhost", user = "flipper", passwd =
"[hidden]", db = "mydb")

produces this error:
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.3/site-packages/MySQLdb/__init__.py", line 63, in Connect
    return apply(Connection, args, kwargs)
  File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line 115, in __init__
    self._make_connection(args, kwargs2)
  File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line 41, in _make_connection
    apply(super(ConnectionBase, self).__init__, args, kwargs)
_mysql_exceptions.OperationalError: (1045, "Access denied for user:
'flipper at localhost' (Using password: YES)")

I also have MySQL installed, and tried setting up the user flipper with
the mysql client, as per the instructions here:
http://vsbabu.org/mt/archives/2003/04/17/mysql_in_mandrake_91.html



More information about the Python-list mailing list