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/>
6
.\" Manual: MySQL Database System
10
.TH "\FBMYSQL_INSTALL_DB\" "1" "10/11/2011" "MySQL 5\&.5" "MySQL Database System"
11
.\" -----------------------------------------------------------------
12
.\" * set default formatting
13
.\" -----------------------------------------------------------------
14
.\" disable hyphenation
16
.\" disable justification (adjust text to left margin only)
18
.\" -----------------------------------------------------------------
19
.\" * MAIN CONTENT STARTS HERE *
20
.\" -----------------------------------------------------------------
23
mysql_install_db \- initialize MySQL data directory
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
29
\fBmysql_install_db\fR
30
initializes the MySQL data directory and creates the system tables that it contains, if they do not exist\&.
33
\fBmysql_install_db\fR, use the following syntax:
39
shell> \fBmysql_install_db [\fR\fB\fIoptions\fR\fR\fB]\fR
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
54
option to indicate the user name that
56
will run as\&. It might be necessary to specify other options such as
61
\fBmysql_install_db\fR
62
does not use the correct locations for the installation directory or data directory\&. For example:
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
76
\fBmysql_install_db\fR
82
\fB\-\-skip\-grant\-tables\fR
83
options\&. If MySQL was configured with the
84
\fBDISABLE_GRANT_OPTIONS\fR
88
\fB\-\-skip\-grant\-tables\fR
90
Section\ \&2.9.4, \(lqMySQL Source-Configuration Options\(rq)\&. To handle this, set the
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\&.
100
.nr an-no-space-flag 1
108
If you have set a custom
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
115
to point to the system temporary directory (usually
120
\fBmysql_install_db\fR
121
supports the following options, which can be specified on the command line or in the
123
and (if they are common to
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\&.
141
.\" mysql_install_db: basedir option
142
.\" basedir option: mysql_install_db
143
\fB\-\-basedir=\fR\fB\fIpath\fR\fR
145
The path to the MySQL installation directory\&.
156
.\" mysql_install_db: force option
157
.\" force option: mysql_install_db
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\&.
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
180
The path to the MySQL data directory\&.
191
.\" mysql_install_db: rpm option
192
.\" rpm option: mysql_install_db
195
For internal use\&. This option is used by RPM files during the MySQL installation process\&.
206
.\" mysql_install_db: skip-name-resolve option
207
.\" skip-name-resolve option: mysql_install_db
208
\fB\-\-skip\-name\-resolve\fR
210
Use IP addresses rather than host names when creating grant table entries\&. This option can be useful if your DNS does not work\&.
221
.\" mysql_install_db: srcdir option
222
.\" srcdir option: mysql_install_db
223
\fB\-\-srcdir=\fR\fB\fIpath\fR\fR
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\&.
238
.\" mysql_install_db: user option
239
.\" user option: mysql_install_db
240
\fB\-\-user=\fR\fB\fIuser_name\fR\fR
242
The login user name to use for running
243
\fBmysqld\fR\&. Files and directories created by
245
will be owned by this user\&. You must be
247
to use this option\&. By default,
249
runs using your current login name and files and directories that it creates will be owned by you\&.
260
.\" mysql_install_db: verbose option
261
.\" verbose option: mysql_install_db
264
Verbose mode\&. Print more information about what the program does\&.
275
.\" mysql_install_db: windows option
276
.\" windows option: mysql_install_db
279
For internal use\&. This option is used for creating Windows distributions\&.
284
Copyright \(co 1997, 2011, Oracle and/or its affiliates. All rights reserved.
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.
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.
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/.
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/.
297
Oracle Corporation (http://dev.mysql.com/).