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.

268 lines
6.6 KiB

  1. '\" t
  2. .\" Title: \fBmysql_install_db\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_INSTALL_DB\" "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_install_db
  22. .SH "NAME"
  23. mysql_install_db \- initialize MySQL data directory
  24. .SH "SYNOPSIS"
  25. .HP \w'\fBmysql_install_db\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
  26. \fBmysql_install_db [\fR\fB\fIoptions\fR\fR\fB]\fR
  27. .SH "DESCRIPTION"
  28. .PP
  29. \fBmysql_install_db\fR
  30. initializes the MySQL data directory and creates the system tables that it contains, if they do not exist\&.
  31. .PP
  32. To invoke
  33. \fBmysql_install_db\fR, use the following syntax:
  34. .sp
  35. .if n \{\
  36. .RS 4
  37. .\}
  38. .nf
  39. shell> \fBmysql_install_db [\fR\fB\fIoptions\fR\fR\fB]\fR
  40. .fi
  41. .if n \{\
  42. .RE
  43. .\}
  44. .PP
  45. Because the MySQL server,
  46. \fBmysqld\fR, needs to access the data directory when it runs later, you should either run
  47. \fBmysql_install_db\fR
  48. from the same account that will be used for running
  49. \fBmysqld\fR
  50. or run it as
  51. root
  52. and use the
  53. \fB\-\-user\fR
  54. option to indicate the user name that
  55. \fBmysqld\fR
  56. will run as\&. It might be necessary to specify other options such as
  57. \fB\-\-basedir\fR
  58. or
  59. \fB\-\-datadir\fR
  60. if
  61. \fBmysql_install_db\fR
  62. does not use the correct locations for the installation directory or data directory\&. For example:
  63. .sp
  64. .if n \{\
  65. .RS 4
  66. .\}
  67. .nf
  68. shell> \fBbin/mysql_install_db \-\-user=mysql \e\fR
  69. \fB\-\-basedir=/opt/mysql/mysql \e\fR
  70. \fB\-\-datadir=/opt/mysql/mysql/data\fR
  71. .fi
  72. .if n \{\
  73. .RE
  74. .\}
  75. .PP
  76. \fBmysql_install_db\fR
  77. needs to invoke
  78. \fBmysqld\fR
  79. with the
  80. \fB\-\-bootstrap\fR
  81. and
  82. \fB\-\-skip\-grant\-tables\fR
  83. options (see
  84. Section\ \&2.3.2, \(lqTypical configure Options\(rq)\&. If MySQL was configured with the
  85. \fB\-\-disable\-grant\-options\fR
  86. option,
  87. \fB\-\-bootstrap\fR
  88. and
  89. \fB\-\-skip\-grant\-tables\fR
  90. will be disabled\&. To handle this, set the
  91. MYSQLD_BOOTSTRAP
  92. environment variable to the full path name of a server that has all options enabled\&.
  93. \fBmysql_install_db\fR
  94. will use that server\&.
  95. .PP
  96. \fBmysql_install_db\fR
  97. supports the following options, which can be specified on the command line or in the
  98. [mysql_install_db]
  99. and (if they are common to
  100. \fBmysqld\fR)
  101. [mysqld]
  102. option file groups\&.
  103. .sp
  104. .RS 4
  105. .ie n \{\
  106. \h'-04'\(bu\h'+03'\c
  107. .\}
  108. .el \{\
  109. .sp -1
  110. .IP \(bu 2.3
  111. .\}
  112. .\" mysql_install_db: basedir option
  113. .\" basedir option: mysql_install_db
  114. \fB\-\-basedir=\fR\fB\fIpath\fR\fR
  115. .sp
  116. The path to the MySQL installation directory\&.
  117. .RE
  118. .sp
  119. .RS 4
  120. .ie n \{\
  121. \h'-04'\(bu\h'+03'\c
  122. .\}
  123. .el \{\
  124. .sp -1
  125. .IP \(bu 2.3
  126. .\}
  127. .\" mysql_install_db: force option
  128. .\" force option: mysql_install_db
  129. \fB\-\-force\fR
  130. .sp
  131. Cause
  132. \fBmysql_install_db\fR
  133. to run even if DNS does not work\&. In that case, grant table entries that normally use host names will use IP addresses\&.
  134. .RE
  135. .sp
  136. .RS 4
  137. .ie n \{\
  138. \h'-04'\(bu\h'+03'\c
  139. .\}
  140. .el \{\
  141. .sp -1
  142. .IP \(bu 2.3
  143. .\}
  144. .\" mysql_install_db: datadir option
  145. .\" datadir option: mysql_install_db
  146. .\" mysql_install_db: ldata option
  147. .\" ldata option: mysql_install_db
  148. \fB\-\-datadir=\fR\fB\fIpath\fR\fR,
  149. \fB\-\-ldata=\fR\fB\fIpath\fR\fR
  150. .sp
  151. The path to the MySQL data directory\&.
  152. .RE
  153. .sp
  154. .RS 4
  155. .ie n \{\
  156. \h'-04'\(bu\h'+03'\c
  157. .\}
  158. .el \{\
  159. .sp -1
  160. .IP \(bu 2.3
  161. .\}
  162. .\" mysql_install_db: rpm option
  163. .\" rpm option: mysql_install_db
  164. \fB\-\-rpm\fR
  165. .sp
  166. For internal use\&. This option is used by RPM files during the MySQL installation process\&.
  167. .RE
  168. .sp
  169. .RS 4
  170. .ie n \{\
  171. \h'-04'\(bu\h'+03'\c
  172. .\}
  173. .el \{\
  174. .sp -1
  175. .IP \(bu 2.3
  176. .\}
  177. .\" mysql_install_db: skip-name-resolve option
  178. .\" skip-name-resolve option: mysql_install_db
  179. \fB\-\-skip\-name\-resolve\fR
  180. .sp
  181. Use IP addresses rather than host names when creating grant table entries\&. This option can be useful if your DNS does not work\&.
  182. .RE
  183. .sp
  184. .RS 4
  185. .ie n \{\
  186. \h'-04'\(bu\h'+03'\c
  187. .\}
  188. .el \{\
  189. .sp -1
  190. .IP \(bu 2.3
  191. .\}
  192. .\" mysql_install_db: srcdir option
  193. .\" srcdir option: mysql_install_db
  194. \fB\-\-srcdir=\fR\fB\fIpath\fR\fR
  195. .sp
  196. For internal use\&. The directory under which
  197. \fBmysql_install_db\fR
  198. looks for support files such as the error message file and the file for populating the help tables\&. This option was added in MySQL 5\&.1\&.14\&.
  199. .RE
  200. .sp
  201. .RS 4
  202. .ie n \{\
  203. \h'-04'\(bu\h'+03'\c
  204. .\}
  205. .el \{\
  206. .sp -1
  207. .IP \(bu 2.3
  208. .\}
  209. .\" mysql_install_db: user option
  210. .\" user option: mysql_install_db
  211. \fB\-\-user=\fR\fB\fIuser_name\fR\fR
  212. .sp
  213. The login user name to use for running
  214. \fBmysqld\fR\&. Files and directories created by
  215. \fBmysqld\fR
  216. will be owned by this user\&. You must be
  217. root
  218. to use this option\&. By default,
  219. \fBmysqld\fR
  220. runs using your current login name and files and directories that it creates will be owned by you\&.
  221. .RE
  222. .sp
  223. .RS 4
  224. .ie n \{\
  225. \h'-04'\(bu\h'+03'\c
  226. .\}
  227. .el \{\
  228. .sp -1
  229. .IP \(bu 2.3
  230. .\}
  231. .\" mysql_install_db: verbose option
  232. .\" verbose option: mysql_install_db
  233. \fB\-\-verbose\fR
  234. .sp
  235. Verbose mode\&. Print more information about what the program does\&.
  236. .RE
  237. .sp
  238. .RS 4
  239. .ie n \{\
  240. \h'-04'\(bu\h'+03'\c
  241. .\}
  242. .el \{\
  243. .sp -1
  244. .IP \(bu 2.3
  245. .\}
  246. .\" mysql_install_db: windows option
  247. .\" windows option: mysql_install_db
  248. \fB\-\-windows\fR
  249. .sp
  250. For internal use\&. This option is used for creating Windows distributions\&.
  251. .RE
  252. .SH "COPYRIGHT"
  253. .br
  254. .PP
  255. Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
  256. .PP
  257. 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.
  258. .PP
  259. 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.
  260. .PP
  261. 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/.
  262. .sp
  263. .SH "SEE ALSO"
  264. For more information, please refer to the MySQL Reference Manual,
  265. which may already be installed locally and which is also available
  266. online at http://dev.mysql.com/doc/.
  267. .SH AUTHOR
  268. Sun Microsystems, Inc. (http://www.mysql.com/).