Bug #5229 --password=foobar does not override the empty 'password' option in the my.cnf
Submitted: 26 Aug 2004 14:55 Modified: 8 Sep 2004 15:07
Reporter: Jan Kneschke Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:4.0.20 OS:Microsoft Windows (Windows XP)
Assigned to: Reggie Burnett CPU Architecture:Any

[26 Aug 2004 14:55] Jan Kneschke
Description:
If the password option is set in the configfile to always get asked for a password I can't override it on the commandline to accept the supplied pass. I'm always asked for it.

Manual states:
http://dev.mysql.com/doc/mysql/en/Option_files.html

If multiple option files exist, an option specified in a file read later takes precedence over the same option specified in a file read earlier.

How to repeat:

mysql> GRANT usage ON *.* TO foo@localhost IDENTIFIED BY 'foobar';
mysql> quit

in the my.cnf
[client]
user=foo
password

$ mysql --password=foobar 
Password: 

Suggested fix:
take the password from the command line.
[2 Sep 2004 18:24] Jani Tolonen
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html
[2 Sep 2004 18:31] Reggie Burnett
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Jani tells me this is fixed.
[2 Sep 2004 23:22] Reggie Burnett
Changeset @1.2008
[8 Sep 2004 15:07] Reggie Burnett
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html