Bug #4240 mysql_fix_privilege_tables Does not use --password properly
Submitted: 22 Jun 2004 1:26 Modified: 22 Jun 2004 23:02
Reporter: Clint Byrum Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1.2 OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[22 Jun 2004 1:26] Clint Byrum
Description:
Trying to run mysql_fix_privilege_tables on 4.1.2, and it seems to fail to register the password I pass in with --password=. Note that when I *don't* pass a  password in, it tries to pass the empty string.

How to repeat:
Just run mysql_fix_privilege_tables with --password=something

Suggested fix:
--- mysql_fix_privilege_tables.4.1.2    2004-06-21 16:22:23.000000000 -0700
+++ mysql_fix_privilege_tables  2004-06-21 16:24:49.000000000 -0700
@@ -102,7 +102,7 @@
 fi
  
 cmd="$bindir/mysql -f --user=$user --host=$host"
-if test -z "$password" ; then
+if test -n "$password" ; then
   cmd="$cmd --password=$password"
 fi
 if test ! -z "$port"; then
[22 Jun 2004 23:02] Guilhem Bichot
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:

Thanks for the good patch, I used it almost unchanged.
Fixed in 4.1.3 in ChangeSet@1.1948, 2004-06-22 23:01:20+02:00, guilhem@mysql.com