2009-09-16 14:03:18 +02:00
'\" t
2009-05-25 11:59:47 +02:00
. \"
2019-04-25 08:05:52 +02:00
.TH "\FBMYSQL_INSTALL_DB\FR" "1" "4 April 2019" "MariaDB 10\&.3" "MariaDB 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"
2015-09-09 14:32:52 +02:00
mysql_install_db \- initialize MariaDB data directory
2009-05-25 11:59:47 +02:00
.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
2015-09-09 14:32:52 +02:00
initializes the MariaDB 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
2015-09-09 14:32:52 +02:00
Because the MariaDB server,
2009-05-25 11:59:47 +02:00
\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
2015-09-09 14:32:52 +02:00
Section\ \& 2.3.2, \(lq Typical configure Options\(rq )\& . If MariaDB 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
2010-04-28 15:06:11 +02:00
supports the following options, which can be specified on the command line or in the
[mysql_install_db]
and (if they are common to
\fB mysqld\fR )
[mysqld]
option file groups\& .
2009-09-16 14:03:18 +02:00
.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
2015-09-09 14:32:52 +02:00
The path to the MariaDB installation directory\& .
2009-09-16 14:03:18 +02:00
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2015-09-09 14:32:52 +02:00
. \" mysql_install_db: builddir option
. \" builddir option: mysql_install_db
\fB \- \- builddir=\fI path\fR
2009-05-25 11:59:47 +02:00
.sp
2015-09-09 14:32:52 +02:00
If using \fB --srcdir\fR with out-of-directory builds, you will need to set this
to the location of the build directory where built files reside.\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysql_install_db: cross-bootstrap option
. \" cross-bootstrap option: mysql_install_db
\fB \- \- cross\- bootstrap\fR
.sp
For internal use. Used when building the MariaDB system tables on a different host than the target.\& .
2009-09-16 14:03:18 +02:00
.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
2015-09-09 14:32:52 +02:00
The path to the MariaDB data directory\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlcheck: defaults-extra-file option
. \" defaults-extra-file option: mysqlcheck
\fB \- \- defaults\- extra\- file=\fR \fB \fI filename\fR \fR
.sp
Set \fB \fI filename\fR \fR as the file to read default options from after the global defaults files has been read\& .
Must be given as first option\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlcheck: defaults-file option
. \" defaults-file option: mysqlcheck
\fB \- \- defaults\- file=\fR \fB \fI filename\fR \fR
.sp
Set \fB \fI filename\fR \fR as the file to read default options from, override global defaults files\& .
Must be given as first option\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2019-04-04 15:33:20 +02:00
. \" mysql_install_db: defaults-group-suffix option
. \" defaults-group-suffix option: mysql_install_db
\fB \- \- defaults\- group\- suffix=\fR \fB \fI name\fR \fR
.sp
In addition to the given groups, also read groups with this suffix\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2015-09-09 14:32:52 +02:00
. \" mysql_install_db: force option
. \" force option: mysql_install_db
\fB \- \- force\fR
.sp
Cause
\fB mysql_install_db\fR
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
. \}
. \" mysqlcheck: help option
. \" help option: mysqlcheck
\fB \- \- help\fR
.sp
Display a help message and exit\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlcheck: no-defaults option
. \" no-defaults option: mysqlcheck
\fB \- \- no\- defaults\fR
.sp
Do not read default options from any option file\& . This must be given as the first argument\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqlcheck: print-defaults option
. \" print-defaults option: mysqlcheck
\fB \- \- print\- defaults\fR
.sp
Print the program argument list and exit\& .
This must be given as the first argument\& .
2009-09-16 14:03:18 +02:00
.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
2015-09-09 14:32:52 +02:00
For internal use\& . This option is used by RPM files during the MariaDB installation process\& .
2009-09-16 14:03:18 +02:00
.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
2015-09-09 14:32:52 +02:00
looks for support files such as the error message file and the file for populating the help tables\& .4\& .
2009-09-16 14:03:18 +02:00
.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
2019-04-04 15:33:20 +02:00
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2019 MariaDB Foundation
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
2019-05-11 20:29:06 +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-1335 USA or see http://www.gnu.org/licenses/.
2009-09-16 14:03:18 +02:00
.sp
2009-05-25 11:59:47 +02:00
.SH "SEE ALSO"
2015-09-09 14:32:52 +02:00
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
2009-05-25 11:59:47 +02:00
.SH AUTHOR
2015-09-09 14:32:52 +02:00
MariaDB Foundation (http://www.mariadb.org/).