Opened 12 years ago

Closed 12 years ago

#5024 closed (fixed)

"Passwd" is invalid option in MySQL option file; must use "Password"

Reported by: ispivey@… Owned by: nobody
Component: Documentation Version: master
Severity: Keywords: mysql database sprintsept14
Cc: sander.dijkhuis@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I followed the instructions in the tutorial and at for configuring MySQL to work with Django using an option file. When trying to start the server with 'python runserver', the server threw an exception. The root exception was:

_mysql_exceptions.OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: NO)")

When I changed the password line in my option file from "passwd = XXX" to "password = XXX", the error disappeared and I was able to start the server. This was strange, because when running the mysql client from the shell I can use either option "passwd" or "password" to login. I've pasted the config files below with the passwords blanked out. Software versions below config files.
                "init_command": "SET storage_engine=INNODB",
                'read_default_file': '/home/ispivey/Code/django/mysql.cnf'
database = testdb
user = root
passwd = XXXXX
default-character-set = utf8

django trunk from svn on Jul 31st
Ubuntu Feisty Fawn
mysql-server 5.0.38-0
mysqldb 1.2.1-p2-4

Attachments (1)

5024.diff (425 bytes) - added by James Bennett 12 years ago.
Patch changing 'passwd' to 'password'

Download all attachments as: .zip

Change History (7)

comment:1 Changed 12 years ago by Adrian Holovaty

This smells like the problem is in another place -- i.e., changing "passwd" to "password" just coincidentally fixed it. I would be a lot more confident in this if you could figure out *why* that was happening.

comment:2 Changed 12 years ago by sander.dijkhuis@…

I've got the same configuration as the reporter, and this fix worked for me. Also in the default /etc/mysql/debian.cnf, 'password' is used instead of 'passwd'. Maybe this is a new standard in MySQL 5.0 or in Ubuntu's configuration?

comment:3 Changed 12 years ago by sander.dijkhuis@…

Cc: sander.dijkhuis@… added

comment:4 Changed 12 years ago by Simon G. <dev@…>

I've been digging through the mysql docs, and all the examples for for versions 4.1, 5.0 and 5.1 are using password instead of passwd.

Has anyone used passwd=xxx successfully?

Changed 12 years ago by James Bennett

Attachment: 5024.diff added

Patch changing 'passwd' to 'password'

comment:5 Changed 12 years ago by James Bennett

Has patch: set
Keywords: sprintsept14 added
Triage Stage: UnreviewedReady for checkin

Attached patch which brings our example into conformance with MySQL's docs, bumping to "ready for checkin".

comment:6 Changed 12 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [6261]) Fixed #5024 -- Fixed potential error in docs/databases.txt related to MySQL 'passwd'. Thanks, ispivey@… and ubernostrum

Note: See TracTickets for help on using tickets.
Back to Top