Bug #18156 mysql_upgrade does not pass basedir or password arg to mysql and mysqlcheck
Submitted: 11 Mar 2006 16:56 Modified: 19 Dec 2006 5:56
Reporter: Oli Sennhauser Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.19, 5.0.21, 5.0.22-BK OS:Linux (Linux)
Assigned to: Assigned Account CPU Architecture:Any

[11 Mar 2006 16:56] Oli Sennhauser
Description:
I have installed mysql in a non default location (/u00/app/mysql/product/mysql-5.0.19).

When I start mysql_upgrade I get an error that I have to specify basedir because it could not find mysql itself (mysql is on the same directory like mysql_upgrade and PATH is set correct!)

How to repeat:
$ mysql_upgrade --user=mysql --verbose   # basedir is e.g. /u00/app/mysql/product/mysql-5.0.19

Suggested fix:
mysql_upgrade has to pass basedir to the call of mysql_fix_privilege_tables at least if set!!! This happens at least twice: line 179 and 203
[25 Mar 2006 7:47] Xing Li
I have the same problem with 5.1.7b package trying to upgrade to a 5.0 db.
[28 Apr 2006 16:52] Valeriy Kravchuk
Please, try to repeat with a newer version, 5.0.20a, and inform about the results.
[9 May 2006 7:23] Oli Sennhauser
Why should it have changed??? The scripts are still the same. Nothing changed....

I tried it out and got the error again!
[10 May 2006 10:59] Valeriy Kravchuk
Verified as described. Just look at the source of mysql_upgrade :)
[31 May 2006 20:06] Richard McLane
I think this is probably related but if not I can open another bug.  mysql_upgrade is not passing the -p option to prompt for password to the mysql_fix_privilege_tables part of the script.
[14 Dec 2006 21:33] Iggy Galarza
Changed problem description to include symptom described in message [31 May 22:06] Richard McLane.

The original problem as described is a duplicate of 22807.
The expanded problem requires a different fix.
[19 Dec 2006 5:55] Iggy Galarza
The second bug with the password option is a duplicate of 24896.