2009-09-16 14:03:18 +02:00
'\" t
2009-05-25 11:59:47 +02:00
. \" Title: \fBmysql_install_db\fR
2009-09-16 14:03:18 +02:00
. \" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
. \" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
2009-12-01 08:24:05 +01:00
. \" Date: 11/04/2009
2009-05-25 11:59:47 +02:00
. \" Manual: MySQL Database System
. \" Source: MySQL 5.1
2009-09-16 14:03:18 +02:00
. \" Language: English
2009-05-25 11:59:47 +02:00
. \"
2009-12-01 08:24:05 +01:00
.TH "\FBMYSQL_INSTALL_DB\" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
2009-09-16 14:03:18 +02:00
. \" -----------------------------------------------------------------
. \" * set default formatting
. \" -----------------------------------------------------------------
2009-05-25 11:59:47 +02:00
. \" disable hyphenation
.nh
. \" disable justification (adjust text to left margin only)
.ad l
2009-09-16 14:03:18 +02:00
. \" -----------------------------------------------------------------
. \" * MAIN CONTENT STARTS HERE *
. \" -----------------------------------------------------------------
. \" mysql_install_db
2009-05-25 11:59:47 +02:00
.SH "NAME"
mysql_install_db \- initialize MySQL data directory
.SH "SYNOPSIS"
2009-09-16 14:03:18 +02:00
.HP \w '\fBmysql_install_db\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
2009-05-25 11:59:47 +02:00
\fB mysql_install_db [\fR \fB \fI options\fR \fR \fB ]\fR
.SH "DESCRIPTION"
.PP
\fB mysql_install_db\fR
2009-09-16 14:03:18 +02:00
initializes the MySQL data directory and creates the system tables that it contains, if they do not exist\& .
2009-05-25 11:59:47 +02:00
.PP
To invoke
\fB mysql_install_db\fR , use the following syntax:
.sp
2009-09-16 14:03:18 +02:00
.if n \{ \
.RS 4
. \}
2009-05-25 11:59:47 +02:00
.nf
shell> \fB mysql_install_db [\fR \fB \fI options\fR \fR \fB ]\fR
.fi
2009-09-16 14:03:18 +02:00
.if n \{ \
2009-05-25 11:59:47 +02:00
.RE
2009-09-16 14:03:18 +02:00
. \}
2009-05-25 11:59:47 +02:00
.PP
Because the MySQL server,
\fB mysqld\fR , needs to access the data directory when it runs later, you should either run
\fB mysql_install_db\fR
from the same account that will be used for running
\fB mysqld\fR
or run it as
root
and use the
\fB \- \- user\fR
option to indicate the user name that
\fB mysqld\fR
2009-09-16 14:03:18 +02:00
will run as\& . It might be necessary to specify other options such as
2009-05-25 11:59:47 +02:00
\fB \- \- basedir\fR
or
\fB \- \- datadir\fR
if
\fB mysql_install_db\fR
2009-09-16 14:03:18 +02:00
does not use the correct locations for the installation directory or data directory\& . For example:
2009-05-25 11:59:47 +02:00
.sp
2009-09-16 14:03:18 +02:00
.if n \{ \
.RS 4
. \}
2009-05-25 11:59:47 +02:00
.nf
2009-09-16 14:03:18 +02:00
shell> \fB bin/mysql_install_db \- \- user=mysql \e \fR
\fB \- \- basedir=/opt/mysql/mysql \e \fR
2009-05-25 11:59:47 +02:00
\fB \- \- datadir=/opt/mysql/mysql/data\fR
.fi
2009-09-16 14:03:18 +02:00
.if n \{ \
2009-05-25 11:59:47 +02:00
.RE
2009-09-16 14:03:18 +02:00
. \}
2009-05-25 11:59:47 +02:00
.PP
\fB mysql_install_db\fR
needs to invoke
\fB mysqld\fR
with the
\fB \- \- bootstrap\fR
and
\fB \- \- skip\- grant\- tables\fR
options (see
2009-12-01 08:24:05 +01:00
Section\ \& 2.3.2, \(lq Typical configure Options\(rq )\& . If MySQL was configured with the
2009-05-25 11:59:47 +02:00
\fB \- \- disable\- grant\- options\fR
option,
\fB \- \- bootstrap\fR
and
\fB \- \- skip\- grant\- tables\fR
2009-09-16 14:03:18 +02:00
will be disabled\& . To handle this, set the
2009-05-25 11:59:47 +02:00
MYSQLD_BOOTSTRAP
2009-09-16 14:03:18 +02:00
environment variable to the full path name of a server that has all options enabled\& .
2009-05-25 11:59:47 +02:00
\fB mysql_install_db\fR
2009-09-16 14:03:18 +02:00
will use that server\& .
2009-05-25 11:59:47 +02:00
.PP
\fB mysql_install_db\fR
2009-09-16 14:03:18 +02:00
supports the options in the following list\& . It also reads option files and supports the options for processing them described at
Section\ \& 4.2.3.3.1, \(lq Command-Line Options that Affect Option-File Handling\(rq \& .
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysql_install_db: basedir option
. \" basedir option: mysql_install_db
2009-05-25 11:59:47 +02:00
\fB \- \- basedir=\fR \fB \fI path\fR \fR
.sp
2009-09-16 14:03:18 +02:00
The path to the MySQL installation directory\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysql_install_db: force option
. \" force option: mysql_install_db
2009-05-25 11:59:47 +02:00
\fB \- \- force\fR
.sp
2009-09-16 14:03:18 +02:00
Cause
2009-05-25 11:59:47 +02:00
\fB mysql_install_db\fR
2009-09-16 14:03:18 +02:00
to run even if DNS does not work\& . In that case, grant table entries that normally use host names will use IP addresses\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysql_install_db: datadir option
. \" datadir option: mysql_install_db
. \" mysql_install_db: ldata option
. \" ldata option: mysql_install_db
2009-05-25 11:59:47 +02:00
\fB \- \- datadir=\fR \fB \fI path\fR \fR ,
\fB \- \- ldata=\fR \fB \fI path\fR \fR
.sp
2009-09-16 14:03:18 +02:00
The path to the MySQL data directory\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysql_install_db: rpm option
. \" rpm option: mysql_install_db
2009-05-25 11:59:47 +02:00
\fB \- \- rpm\fR
.sp
2009-09-16 14:03:18 +02:00
For internal use\& . This option is used by RPM files during the MySQL installation process\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysql_install_db: skip-name-resolve option
. \" skip-name-resolve option: mysql_install_db
2009-05-25 11:59:47 +02:00
\fB \- \- skip\- name\- resolve\fR
.sp
2009-09-16 14:03:18 +02:00
Use IP addresses rather than host names when creating grant table entries\& . This option can be useful if your DNS does not work\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysql_install_db: srcdir option
. \" srcdir option: mysql_install_db
2009-05-25 11:59:47 +02:00
\fB \- \- srcdir=\fR \fB \fI path\fR \fR
.sp
2009-09-16 14:03:18 +02:00
For internal use\& . The directory under which
2009-05-25 11:59:47 +02:00
\fB mysql_install_db\fR
2009-09-16 14:03:18 +02:00
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\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysql_install_db: user option
. \" user option: mysql_install_db
2009-05-25 11:59:47 +02:00
\fB \- \- user=\fR \fB \fI user_name\fR \fR
.sp
The login user name to use for running
2009-09-16 14:03:18 +02:00
\fB mysqld\fR \& . Files and directories created by
2009-05-25 11:59:47 +02:00
\fB mysqld\fR
2009-09-16 14:03:18 +02:00
will be owned by this user\& . You must be
2009-05-25 11:59:47 +02:00
root
2009-09-16 14:03:18 +02:00
to use this option\& . By default,
2009-05-25 11:59:47 +02:00
\fB mysqld\fR
2009-09-16 14:03:18 +02:00
runs using your current login name and files and directories that it creates will be owned by you\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysql_install_db: verbose option
. \" verbose option: mysql_install_db
2009-05-25 11:59:47 +02:00
\fB \- \- verbose\fR
.sp
2009-09-16 14:03:18 +02:00
Verbose mode\& . Print more information about what the program does\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysql_install_db: windows option
. \" windows option: mysql_install_db
2009-05-25 11:59:47 +02:00
\fB \- \- windows\fR
.sp
2009-09-16 14:03:18 +02:00
For internal use\& . This option is used for creating Windows distributions\& .
.RE
2009-05-25 11:59:47 +02:00
.SH "COPYRIGHT"
2009-09-16 14:03:18 +02:00
.br
2009-05-25 11:59:47 +02:00
.PP
2009-09-16 14:03:18 +02:00
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
2009-05-25 11:59:47 +02:00
.PP
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.
.PP
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.
.PP
2009-09-16 14:03:18 +02:00
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/.
.sp
2009-05-25 11:59:47 +02:00
.SH "SEE ALSO"
For more information, please refer to the MySQL Reference Manual,
which may already be installed locally and which is also available
online at http://dev.mysql.com/doc/.
.SH AUTHOR
2009-09-16 14:03:18 +02:00
Sun Microsystems, Inc. (http://www.mysql.com/).