1MYSQL_FIX_PRIVILE(1) MySQL Database System MYSQL_FIX_PRIVILE(1)
2
3
4
6 mysql_fix_privilege_tables - upgrade MySQL system tables
7
9 mysql_fix_privilege_tables --password=root_password
10
12 Note
13 In MySQL 5.1.7, mysql_fix_privilege_tables was superseded by
14 mysql_upgrade, which should be used instead. See mysql_upgrade(1).
15
16 Some releases of MySQL introduce changes to the structure of the system
17 tables in the mysql database to add new privileges or support new
18 features. When you update to a new version of MySQL, you should update
19 your system tables as well to make sure that their structure is up to
20 date. Otherwise, there might be capabilities that you cannot take
21 advantage of.
22
23 mysql_fix_privilege_tables is an older script that previously was used
24 to upgrade the system tables in the mysql database after a MySQL
25 upgrade.
26
27 Before running mysql_fix_privilege_tables, make a backup of your mysql
28 database.
29
30 On Unix or Unix-like systems, update the system tables by running the
31 mysql_fix_privilege_tables script:
32
33 shell> mysql_fix_privilege_tables
34
35 You must run this script while the server is running. It attempts to
36 connect to the server running on the local host as root. If your root
37 account requires a password, indicate the password on the command line
38 like this:
39
40 shell> mysql_fix_privilege_tables --password=root_password
41
42 The mysql_fix_privilege_tables script performs any actions necessary to
43 convert your system tables to the current format. You might see some
44 Duplicate column name warnings as it runs; you can ignore them.
45
46 After running the script, stop the server and restart it so that any
47 changes made to the system tables take effect.
48
49 On Windows systems, MySQL distributions include a
50 mysql_fix_privilege_tables.sql SQL script that you can run using the
51 mysql client. For example, if your MySQL installation is located at
52 C:\Program Files\MySQL\MySQL Server 5.1, the commands look like this:
53
54 C:\> cd "C:\Program Files\MySQL\MySQL Server 5.1"
55 C:\> bin\mysql -u root -p mysql
56 mysql> SOURCE share/mysql_fix_privilege_tables.sql
57
58
59 Note
60 Prior to version 5.1.17, the mysql_fix_privilege_tables.sql script
61 is found in the scripts directory.
62
63 The mysql command will prompt you for the root password; enter it when
64 prompted.
65
66 If your installation is located in some other directory, adjust the
67 path names appropriately.
68
69 As with the Unix procedure, you might see some Duplicate column name
70 warnings as mysql processes the statements in the
71 mysql_fix_privilege_tables.sql script; you can ignore them.
72
73 After running the script, stop the server and restart it.
74
76 Copyright © 1997, 2013, Oracle and/or its affiliates. All rights
77 reserved.
78
79 This documentation is free software; you can redistribute it and/or
80 modify it only under the terms of the GNU General Public License as
81 published by the Free Software Foundation; version 2 of the License.
82
83 This documentation is distributed in the hope that it will be useful,
84 but WITHOUT ANY WARRANTY; without even the implied warranty of
85 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
86 General Public License for more details.
87
88 You should have received a copy of the GNU General Public License along
89 with the program; if not, write to the Free Software Foundation, Inc.,
90 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see
91 http://www.gnu.org/licenses/.
92
93
95 For more information, please refer to the MySQL Reference Manual, which
96 may already be installed locally and which is also available online at
97 http://dev.mysql.com/doc/.
98
100 Oracle Corporation (http://dev.mysql.com/).
101
102
103
104MySQL 5.1 11/04/2013 MYSQL_FIX_PRIVILE(1)