Bug #23143 mysql_upgrade basedir and File_Priv column error message
| Submitted: | 10 Oct 2006 15:39 | Modified: | 25 Nov 2006 13:05 |
|---|---|---|---|
| Reporter: | Björn Wiberg | Email Updates: | |
| Status: | Can't repeat | Impact on me: | |
| Category: | MySQL Server | Severity: | S3 (Non-critical) |
| Version: | 5.0.26 | OS: | IBM AIX 5.2, 5.3 |
| Assigned to: | CPU Architecture: | Any |
[10 Oct 2006 15:39]
Björn Wiberg
[21 Oct 2006 10:30]
dan d
Same happen for an upgrade from 4.1 (windows) And also on the original data/mysql tables from the 5.0.26 distribution. > mysql_upgrade.exe --basedir=e:\mysql-5.0 --user=root -p --force -v [... other tables OK ...] mysql.time_zone_transition_type OK mysql.user OK ERROR 1060 (42S21) at line 22: Duplicate column name 'File_priv'
[28 Oct 2006 18:59]
Jonathan Joseph
Same thing happens upgrading from 5.0.21 to 5.0.26 on RH 7.3 linux-i686. Is it harmless? -Jonathan
[8 Nov 2006 11:28]
Hans Rakers
I just ran into the same problem when upgrading a 4.1.21 install to 5.0.26 This is a serious problem since mysql_upgrade is supposed to replace mysql_fix_privilege_tables. I tried commenting line 22 but then it starts whining about line 28. The error is critical since the program exits on an error instead of just continuing like mysql_fix_privilege_tables does. I noticed this because the mysql.proc and mysql.procs_priv etc. tables weren't created. The only way i could update my privilege tables was by using mysql_fix_privilege_tables...
[25 Nov 2006 13:05]
Valeriy Kravchuk
I can not repeat the behaviour described with latest 5.0.32-BK and 5.1.14-BK on Linux.
[2 Dec 2006 21:48]
Nicolai Schlenzig
Same problem upgrading from 4.1.22 to 5.0.27 on FreeBSD. I had to append "--basedir /usr/local" to "mysql_upgrade" in order to get the thing started. Then I also get: ERROR 1060 (42S21) at line 22: Duplicate column name 'File_priv' Trying these forums and Google to find out more...
[7 Apr 2007 19:06]
steve madere
I ran into this same problem and found a workaround that hints at the cause of the initial problem. I believe the true cause of the problem is that mysql_upgrade is not bothering to pass the --force flag to mysql when it runs mysql_fix_privilege_tables.sql The reason I think this is the problem is that mysql_fix_privilege_tables.sql stops executing after encountering the first error (which happens when upgrading from mysql 4.1 to 5.0 at line 22 since the column File_priv already exists in the user table under mysql 4.1) I commented out line #22 while debugging the problem and lo and behold, it next stop executing at line 28 (the next time it tries to add a column that already exists under 4.1). It should not stop if the --force option were passed to mysql. In fact, since the shell script mysql_fix_privilege_table DOES pass the --force flag along it works. Thus, the workaround is to run the following two commands instead of mysql_upgrade: mysqlcheck --check-upgrade --all-databases --auto-repair -p mysql_fix_privilege_table $mysql_root_password
[7 Apr 2007 19:09]
steve madere
continuing previous comment:
Environment:
upgrading from mysql 4.1.11 to mysql 5.0.27
on Fedora Core 6 final (Zod) i386.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.056 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.