Bug #4543 mysql_fix_privilege_tables --password doesn't work in 4.1.3

Submitted: 14 Jul 2004 7:10 Modified: 14 Jul 2004 14:42
Reporter: Max Kanat-Alexander Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1.3 OS:Linux (Red Hat Enterprise Linux 3)
Assigned to: CPU Architecture:Any

[14 Jul 2004 7:10] Max Kanat-Alexander
Description:
When I do:

mysql_fix_privilege_tables --user=admin --password=something --verbose, I get:

----------------
This scripts updates all the mysql privilege tables to be usable by
MySQL 4.0 and above.
 
This is needed if you want to use the new GRANT functions,
CREATE AGGREGATE FUNCTION or want to use the more secure passwords in 4.1

ERROR 1045: Access denied for user 'admin'@'localhost' (using password: NO)
Got a failure from command:
/usr/bin/mysql -f --user=admin --host=localhost --database=mysql
Please check the above output and try again.
 
Running the script with the --verbose option may give you some information
of what went wrong.
 
If you get an 'Access denied' error, you should run this script again and
give the MySQL root user password as an argument with the --password= option
----------------

Note that it didn't think I'd put --password on the line.

How to repeat:
Use the --password argument to the script at all.

Suggested fix:
--- fixtables-old       2004-07-14 00:09:58.000000000 -0500
+++ mysql_fix_privilege_tables  2004-07-14 00:09:28.000000000 -0500
@@ -102,7 +102,7 @@
 fi
  
 cmd="$bindir/mysql -f --user=$user --host=$host"
-if test -z "$password" ; then
+if test ! -z "$password" ; then
   cmd="$cmd --password=$password"
 fi
 if test ! -z "$port"; then
[14 Jul 2004 7:12] Max Kanat-Alexander
Also, while I'm here, I might as well comment:

"This scripts updates" in the above output should be "This script updates" -- I know, I know, it should be a separate bug. (I'm a QA technician, I manage a Bugzilla, I feel your pain.)
[14 Jul 2004 14:42] 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:

Thank you for your bug report. The fix will be in 4.1.4.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.050 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.