Gentoo Archives: gentoo-server

From: Alex Efros <powerman@××××××××××××××××××.com>
To: gentoo-server@l.g.o
Subject: Re: [gentoo-server] MySQL upgrade guide
Date: Fri, 08 Dec 2006 00:13:25
Message-Id: 20061208001042.GH17171@home.power
In Reply to: [gentoo-server] MySQL upgrade guide by Alex Efros
1 Hi!
2
3 On Fri, Dec 08, 2006 at 01:45:31AM +0200, Alex Efros wrote:
4 > # mysql_upgrade_shell --user=root --password='your_password' \
5 > --protocol=tcp --datadir="${DATADIR}"
6 >
7 > In original MySQL upgrade documentation they recommend to run mysql_upgrade
8 > program and there is nothing about mysql_upgrade_shell script.
9 > AFAIK mysql_upgrade_shell is older version of this program (mysql_upgrade
10 > program was added because there no bash to execute mysql_upgrade_shell
11 > script on Win32).
12 > So, what's better to run - mysql_upgrade_shell or mysql_upgrade? Or there
13 > no difference between them now?
14
15 BTW, I got error while running mysql_upgrade_shell:
16
17 ---cut---
18 # mysql_upgrade_shell --user=root --password='MYPASS' --protocol=tcp --datadir="${DATADIR}"
19 This script updates all the mysql privilege tables to be usable by
20 MySQL 4.0 and above.
21
22 This is needed if you want to use the new GRANT functions,
23 CREATE AGGREGATE FUNCTION, stored procedures, or
24 more secure passwords in 4.1
25
26 Got a failure from command:
27 cat /usr/share/mysql/mysql_fix_privilege_tables.sql | /usr/bin/mysql --no-defaults --force --user=root --host=localhost --password=MYPASS --database=mysql
28 Please check the above output and try again.
29
30 Running the script with the --verbose option may give you some information
31 of what went wrong.
32
33 If you get an 'Access denied' error, you should run this script again and
34 give the MySQL root user password as an argument with the --password= option
35 ---cut---
36
37 As you see, there no "above output", so I've tried to run failed command
38 manually. And got strange output with some errors:
39
40 ---cut---
41 ERROR 1060 (42S21) at line 22: Duplicate column name 'File_priv'
42 @hadGrantPriv:=1
43 1
44 1
45 1
46 1
47 1
48 1
49 1
50 1
51 1
52 1
53 1
54 1
55 1
56 1
57 1
58 1
59 1
60 1
61 1
62 1
63 1
64 1
65 1
66 1
67 ERROR 1060 (42S21) at line 28: Duplicate column name 'Grant_priv'
68 ERROR 1060 (42S21) at line 29: Duplicate column name 'Grant_priv'
69 ERROR 1060 (42S21) at line 30: Duplicate column name 'Grant_priv'
70 ERROR 1060 (42S21) at line 41: Duplicate column name 'ssl_type'
71 ERROR 1146 (42S02) at line 67: Table 'mysql.procs_priv' doesn't exist
72 ERROR 1146 (42S02) at line 68: Table 'mysql.procs_priv' doesn't exist
73 ERROR 1146 (42S02) at line 70: Table 'mysql.procs_priv' doesn't exist
74 ERROR 1146 (42S02) at line 72: Table 'mysql.procs_priv' doesn't exist
75 ERROR 1054 (42S22) at line 94: Unknown column 'Type' in 'columns_priv'
76 ERROR 1060 (42S21) at line 100: Duplicate column name 'type'
77 @hadShowDbPriv:=1
78 1
79 1
80 1
81 1
82 1
83 1
84 1
85 1
86 1
87 1
88 1
89 1
90 1
91 1
92 1
93 1
94 1
95 1
96 1
97 1
98 1
99 1
100 1
101 1
102 ERROR 1060 (42S21) at line 110: Duplicate column name 'Show_db_priv'
103 ERROR 1060 (42S21) at line 127: Duplicate column name 'max_questions'
104 ERROR 1060 (42S21) at line 137: Duplicate column name 'Create_tmp_table_priv'
105 ERROR 1060 (42S21) at line 140: Duplicate column name 'Create_tmp_table_priv'
106 ERROR 1061 (42000) at line 145: Duplicate key name 'Grantor'
107 ERROR 1054 (42S22) at line 247: Unknown column 'Create_view_priv' in 'where clause'
108 ERROR 1054 (42S22) at line 277: Unknown column 'Create_routine_priv' in 'where clause'
109 ERROR 1054 (42S22) at line 313: Unknown column 'Create_user_priv' in 'where clause'
110 ---cut---
111
112 Running mysql_upgrade result in similar errors but looks like it stop on
113 first error:
114
115 ---cut---
116 # mysql_upgrade -p -v --basedir=/usr
117 Enter password:
118 mysql_upgrade already done for this version
119 ERROR 1060 (42S21) at line 22: Duplicate column name 'File_priv'
120 ---cut---
121
122 --
123 WBR, Alex.
124 --
125 gentoo-server@g.o mailing list

Replies

Subject Author
Re: [gentoo-server] MySQL upgrade guide Francesco Riosa <vivo@g.o>