You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

175 lines
5.1 KiB

  1. '\" t
  2. .\" Title: \fBmysql_fix_privilege_tables\fR
  3. .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
  4. .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
  5. .\" Date: 04/06/2010
  6. .\" Manual: MySQL Database System
  7. .\" Source: MySQL 5.1
  8. .\" Language: English
  9. .\"
  10. .TH "\FBMYSQL_FIX_PRIVILE" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System"
  11. .\" -----------------------------------------------------------------
  12. .\" * set default formatting
  13. .\" -----------------------------------------------------------------
  14. .\" disable hyphenation
  15. .nh
  16. .\" disable justification (adjust text to left margin only)
  17. .ad l
  18. .\" -----------------------------------------------------------------
  19. .\" * MAIN CONTENT STARTS HERE *
  20. .\" -----------------------------------------------------------------
  21. .\" mysql_fix_privilege_tables
  22. .\" upgrading: grant tables
  23. .\" grant tables: upgrading
  24. .SH "NAME"
  25. mysql_fix_privilege_tables \- upgrade MySQL system tables
  26. .SH "SYNOPSIS"
  27. .HP \w'\fBmysql_fix_privilege_tables\ \-\-password=\fR\fB\fIroot_password\fR\fR\ 'u
  28. \fBmysql_fix_privilege_tables \-\-password=\fR\fB\fIroot_password\fR\fR
  29. .SH "DESCRIPTION"
  30. .if n \{\
  31. .sp
  32. .\}
  33. .RS 4
  34. .it 1 an-trap
  35. .nr an-no-space-flag 1
  36. .nr an-break-flag 1
  37. .br
  38. .ps +1
  39. \fBNote\fR
  40. .ps -1
  41. .br
  42. .PP
  43. In MySQL 5\&.1\&.7,
  44. \fBmysql_fix_privilege_tables\fR
  45. was superseded by
  46. \fBmysql_upgrade\fR, which should be used instead\&. See
  47. \fBmysql_upgrade\fR(1)\&.
  48. .sp .5v
  49. .RE
  50. .PP
  51. Some releases of MySQL introduce changes to the structure of the system tables in the
  52. mysql
  53. database to add new privileges or support new features\&. When you update to a new version of MySQL, you should update your system tables as well to make sure that their structure is up to date\&. Otherwise, there might be capabilities that you cannot take advantage of\&.
  54. .PP
  55. \fBmysql_fix_privilege_tables\fR
  56. is an older script that previously was used to uprade the system tables in the
  57. mysql
  58. database after a MySQL upgrade\&.
  59. .PP
  60. Before running
  61. \fBmysql_fix_privilege_tables\fR, make a backup of your
  62. mysql
  63. database\&.
  64. .PP
  65. On Unix or Unix\-like systems, update the system tables by running the
  66. \fBmysql_fix_privilege_tables\fR
  67. script:
  68. .sp
  69. .if n \{\
  70. .RS 4
  71. .\}
  72. .nf
  73. shell> \fBmysql_fix_privilege_tables\fR
  74. .fi
  75. .if n \{\
  76. .RE
  77. .\}
  78. .PP
  79. You must run this script while the server is running\&. It attempts to connect to the server running on the local host as
  80. root\&. If your
  81. root
  82. account requires a password, indicate the password on the command line like this:
  83. .sp
  84. .if n \{\
  85. .RS 4
  86. .\}
  87. .nf
  88. shell> \fBmysql_fix_privilege_tables \-\-password=\fR\fB\fIroot_password\fR\fR
  89. .fi
  90. .if n \{\
  91. .RE
  92. .\}
  93. .PP
  94. The
  95. \fBmysql_fix_privilege_tables\fR
  96. script performs any actions necessary to convert your system tables to the current format\&. You might see some
  97. Duplicate column name
  98. warnings as it runs; you can ignore them\&.
  99. .PP
  100. After running the script, stop the server and restart it so that any changes made to the system tables take effect\&.
  101. .PP
  102. On Windows systems, MySQL distributions include a
  103. mysql_fix_privilege_tables\&.sql
  104. SQL script that you can run using the
  105. \fBmysql\fR
  106. client\&. For example, if your MySQL installation is located at
  107. C:\eProgram Files\eMySQL\eMySQL Server 5\&.1, the commands look like this:
  108. .sp
  109. .if n \{\
  110. .RS 4
  111. .\}
  112. .nf
  113. C:\e> \fBcd "C:\eProgram Files\eMySQL\eMySQL Server 5\&.1"\fR
  114. C:\e> \fBbin\emysql \-u root \-p mysql\fR
  115. mysql> \fBSOURCE share/mysql_fix_privilege_tables\&.sql\fR
  116. .fi
  117. .if n \{\
  118. .RE
  119. .\}
  120. .sp
  121. .if n \{\
  122. .sp
  123. .\}
  124. .RS 4
  125. .it 1 an-trap
  126. .nr an-no-space-flag 1
  127. .nr an-break-flag 1
  128. .br
  129. .ps +1
  130. \fBNote\fR
  131. .ps -1
  132. .br
  133. .PP
  134. Prior to version 5\&.1\&.17, the
  135. mysql_fix_privilege_tables\&.sql
  136. script is found in the
  137. scripts
  138. directory\&.
  139. .sp .5v
  140. .RE
  141. .PP
  142. The
  143. \fBmysql\fR
  144. command will prompt you for the
  145. root
  146. password; enter it when prompted\&.
  147. .PP
  148. If your installation is located in some other directory, adjust the path names appropriately\&.
  149. .PP
  150. As with the Unix procedure, you might see some
  151. Duplicate column name
  152. warnings as
  153. \fBmysql\fR
  154. processes the statements in the
  155. mysql_fix_privilege_tables\&.sql
  156. script; you can ignore them\&.
  157. .PP
  158. After running the script, stop the server and restart it\&.
  159. .SH "COPYRIGHT"
  160. .br
  161. .PP
  162. Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
  163. .PP
  164. This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
  165. .PP
  166. This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  167. .PP
  168. You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
  169. .sp
  170. .SH "SEE ALSO"
  171. For more information, please refer to the MySQL Reference Manual,
  172. which may already be installed locally and which is also available
  173. online at http://dev.mysql.com/doc/.
  174. .SH AUTHOR
  175. Sun Microsystems, Inc. (http://www.mysql.com/).