~ubuntu-branches/ubuntu/precise/mysql-5.5/precise-201203300109

« back to all changes in this revision

Viewing changes to man/mysql_install_db.1

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2011-11-08 11:31:13 UTC
  • Revision ID: package-import@ubuntu.com-20111108113113-3ulw01fvi4vn8m25
Tags: upstream-5.5.17
ImportĀ upstreamĀ versionĀ 5.5.17

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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: 10/11/2011
 
6
.\"    Manual: MySQL Database System
 
7
.\"    Source: MySQL 5.5
 
8
.\"  Language: English
 
9
.\"
 
10
.TH "\FBMYSQL_INSTALL_DB\" "1" "10/11/2011" "MySQL 5\&.5" "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> \fBscripts/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\&. If MySQL was configured with the
 
84
\fBDISABLE_GRANT_OPTIONS\fR
 
85
compiler flag,
 
86
\fB\-\-bootstrap\fR
 
87
and
 
88
\fB\-\-skip\-grant\-tables\fR
 
89
will be disabled (see
 
90
Section\ \&2.9.4, \(lqMySQL Source-Configuration Options\(rq)\&. 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
.if n \{\
 
96
.sp
 
97
.\}
 
98
.RS 4
 
99
.it 1 an-trap
 
100
.nr an-no-space-flag 1
 
101
.nr an-break-flag 1
 
102
.br
 
103
.ps +1
 
104
\fBNote\fR
 
105
.ps -1
 
106
.br
 
107
.PP
 
108
If you have set a custom
 
109
TMPDIR
 
110
variable when performing the installation, and the specified directory is not accessible, the execution of
 
111
\fBmysql_install_db\fR
 
112
may fail\&. You should unset
 
113
TMPDIR, or set
 
114
TMPDIR
 
115
to point to the system temporary directory (usually
 
116
/tmp)\&.
 
117
.sp .5v
 
118
.RE
 
119
.PP
 
120
\fBmysql_install_db\fR
 
121
supports the following options, which can be specified on the command line or in the
 
122
[mysql_install_db]
 
123
and (if they are common to
 
124
\fBmysqld\fR)
 
125
[mysqld]
 
126
groups of an option file\&. Other options are passed to
 
127
\fBmysqld\fR\&. For information about option files, see
 
128
Section\ \&4.2.3.3, \(lqUsing Option Files\(rq\&.
 
129
\fBmysql_install_db\fR
 
130
also supports the options for processing option files described at
 
131
Section\ \&4.2.3.3.1, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&.
 
132
.sp
 
133
.RS 4
 
134
.ie n \{\
 
135
\h'-04'\(bu\h'+03'\c
 
136
.\}
 
137
.el \{\
 
138
.sp -1
 
139
.IP \(bu 2.3
 
140
.\}
 
141
.\" mysql_install_db: basedir option
 
142
.\" basedir option: mysql_install_db
 
143
\fB\-\-basedir=\fR\fB\fIpath\fR\fR
 
144
.sp
 
145
The path to the MySQL installation directory\&.
 
146
.RE
 
147
.sp
 
148
.RS 4
 
149
.ie n \{\
 
150
\h'-04'\(bu\h'+03'\c
 
151
.\}
 
152
.el \{\
 
153
.sp -1
 
154
.IP \(bu 2.3
 
155
.\}
 
156
.\" mysql_install_db: force option
 
157
.\" force option: mysql_install_db
 
158
\fB\-\-force\fR
 
159
.sp
 
160
Cause
 
161
\fBmysql_install_db\fR
 
162
to run even if DNS does not work\&. In that case, grant table entries that normally use host names will use IP addresses\&.
 
163
.RE
 
164
.sp
 
165
.RS 4
 
166
.ie n \{\
 
167
\h'-04'\(bu\h'+03'\c
 
168
.\}
 
169
.el \{\
 
170
.sp -1
 
171
.IP \(bu 2.3
 
172
.\}
 
173
.\" mysql_install_db: datadir option
 
174
.\" datadir option: mysql_install_db
 
175
.\" mysql_install_db: ldata option
 
176
.\" ldata option: mysql_install_db
 
177
\fB\-\-datadir=\fR\fB\fIpath\fR\fR,
 
178
\fB\-\-ldata=\fR\fB\fIpath\fR\fR
 
179
.sp
 
180
The path to the MySQL data directory\&.
 
181
.RE
 
182
.sp
 
183
.RS 4
 
184
.ie n \{\
 
185
\h'-04'\(bu\h'+03'\c
 
186
.\}
 
187
.el \{\
 
188
.sp -1
 
189
.IP \(bu 2.3
 
190
.\}
 
191
.\" mysql_install_db: rpm option
 
192
.\" rpm option: mysql_install_db
 
193
\fB\-\-rpm\fR
 
194
.sp
 
195
For internal use\&. This option is used by RPM files during the MySQL installation process\&.
 
196
.RE
 
197
.sp
 
198
.RS 4
 
199
.ie n \{\
 
200
\h'-04'\(bu\h'+03'\c
 
201
.\}
 
202
.el \{\
 
203
.sp -1
 
204
.IP \(bu 2.3
 
205
.\}
 
206
.\" mysql_install_db: skip-name-resolve option
 
207
.\" skip-name-resolve option: mysql_install_db
 
208
\fB\-\-skip\-name\-resolve\fR
 
209
.sp
 
210
Use IP addresses rather than host names when creating grant table entries\&. This option can be useful if your DNS does not work\&.
 
211
.RE
 
212
.sp
 
213
.RS 4
 
214
.ie n \{\
 
215
\h'-04'\(bu\h'+03'\c
 
216
.\}
 
217
.el \{\
 
218
.sp -1
 
219
.IP \(bu 2.3
 
220
.\}
 
221
.\" mysql_install_db: srcdir option
 
222
.\" srcdir option: mysql_install_db
 
223
\fB\-\-srcdir=\fR\fB\fIpath\fR\fR
 
224
.sp
 
225
For internal use\&. The directory under which
 
226
\fBmysql_install_db\fR
 
227
looks for support files such as the error message file and the file for populating the help tables\&.
 
228
.RE
 
229
.sp
 
230
.RS 4
 
231
.ie n \{\
 
232
\h'-04'\(bu\h'+03'\c
 
233
.\}
 
234
.el \{\
 
235
.sp -1
 
236
.IP \(bu 2.3
 
237
.\}
 
238
.\" mysql_install_db: user option
 
239
.\" user option: mysql_install_db
 
240
\fB\-\-user=\fR\fB\fIuser_name\fR\fR
 
241
.sp
 
242
The login user name to use for running
 
243
\fBmysqld\fR\&. Files and directories created by
 
244
\fBmysqld\fR
 
245
will be owned by this user\&. You must be
 
246
root
 
247
to use this option\&. By default,
 
248
\fBmysqld\fR
 
249
runs using your current login name and files and directories that it creates will be owned by you\&.
 
250
.RE
 
251
.sp
 
252
.RS 4
 
253
.ie n \{\
 
254
\h'-04'\(bu\h'+03'\c
 
255
.\}
 
256
.el \{\
 
257
.sp -1
 
258
.IP \(bu 2.3
 
259
.\}
 
260
.\" mysql_install_db: verbose option
 
261
.\" verbose option: mysql_install_db
 
262
\fB\-\-verbose\fR
 
263
.sp
 
264
Verbose mode\&. Print more information about what the program does\&.
 
265
.RE
 
266
.sp
 
267
.RS 4
 
268
.ie n \{\
 
269
\h'-04'\(bu\h'+03'\c
 
270
.\}
 
271
.el \{\
 
272
.sp -1
 
273
.IP \(bu 2.3
 
274
.\}
 
275
.\" mysql_install_db: windows option
 
276
.\" windows option: mysql_install_db
 
277
\fB\-\-windows\fR
 
278
.sp
 
279
For internal use\&. This option is used for creating Windows distributions\&.
 
280
.RE
 
281
.SH "COPYRIGHT"
 
282
.br
 
283
.PP
 
284
Copyright \(co 1997, 2011, Oracle and/or its affiliates. All rights reserved.
 
285
.PP
 
286
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.
 
287
.PP
 
288
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.
 
289
.PP
 
290
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/.
 
291
.sp
 
292
.SH "SEE ALSO"
 
293
For more information, please refer to the MySQL Reference Manual,
 
294
which may already be installed locally and which is also available
 
295
online at http://dev.mysql.com/doc/.
 
296
.SH AUTHOR
 
297
Oracle Corporation (http://dev.mysql.com/).