1MYSQL_INSTALL_DB(1)         MariaDB Database System        MYSQL_INSTALL_DB(1)
2
3
4

NAME

6       mysql_install_db - initialize MariaDB data directory
7

SYNOPSIS

9       mysql_install_db [options]
10

DESCRIPTION

12       mysql_install_db initializes the MariaDB data directory and creates the
13       system tables that it contains, if they do not exist.
14
15       To invoke mysql_install_db, use the following syntax:
16
17           shell> mysql_install_db [options]
18
19       Because the MariaDB server, mysqld, needs to access the data directory
20       when it runs later, you should either run mysql_install_db from the
21       same account that will be used for running mysqld or run it as root and
22       use the --user option to indicate the user name that mysqld will run
23       as. It might be necessary to specify other options such as --basedir or
24       --datadir if mysql_install_db does not use the correct locations for
25       the installation directory or data directory. For example:
26
27           shell> bin/mysql_install_db --user=mysql \
28                    --basedir=/opt/mysql/mysql \
29                    --datadir=/opt/mysql/mysql/data
30
31       mysql_install_db needs to invoke mysqld with the --bootstrap and
32       --skip-grant-tables options (see Section 2.3.2, “Typical configure
33       Options”). If MariaDB was configured with the --disable-grant-options
34       option, --bootstrap and --skip-grant-tables will be disabled. To handle
35       this, set the MYSQLD_BOOTSTRAP environment variable to the full path
36       name of a server that has all options enabled.  mysql_install_db will
37       use that server.
38
39       mysql_install_db supports the following options, which can be specified
40       on the command line or in the [mysql_install_db] and (if they are
41       common to mysqld) [mysqld] option file groups.
42
43       ·   --basedir=path
44
45           The path to the MariaDB installation directory.
46
47       ·   --builddir=path
48
49           If using --srcdir with out-of-directory builds, you will need to
50           set this to the location of the build directory where built files
51           reside..
52
53       ·   --cross-bootstrap
54
55           For internal use. Used when building the MariaDB system tables on a
56           different host than the target..
57
58       ·   --datadir=path, --ldata=path
59
60           The path to the MariaDB data directory.
61
62       ·   --defaults-extra-file=filename
63
64           Set filename as the file to read default options from after the
65           global defaults files has been read.  Must be given as first
66           option.
67
68       ·   --defaults-file=filename
69
70           Set filename as the file to read default options from, override
71           global defaults files.  Must be given as first option.
72
73       ·   --defaults-group-suffix=name
74
75           In addition to the given groups, also read groups with this suffix.
76
77       ·   --force
78
79           Cause mysql_install_db to run even if DNS does not work. In that
80           case, grant table entries that normally use host names will use IP
81           addresses.
82
83       ·   --help
84
85           Display a help message and exit.
86
87       ·   --no-defaults
88
89           Do not read default options from any option file. This must be
90           given as the first argument.
91
92       ·   --print-defaults
93
94           Print the program argument list and exit.  This must be given as
95           the first argument.
96
97       ·   --rpm
98
99           For internal use. This option is used by RPM files during the
100           MariaDB installation process.
101
102       ·   --skip-name-resolve
103
104           Use IP addresses rather than host names when creating grant table
105           entries. This option can be useful if your DNS does not work.
106
107       ·   --srcdir=path
108
109           For internal use. The directory under which mysql_install_db looks
110           for support files such as the error message file and the file for
111           populating the help tables.4.
112
113       ·   --user=user_name
114
115           The login user name to use for running mysqld. Files and
116           directories created by mysqld will be owned by this user. You must
117           be root to use this option. By default, mysqld runs using your
118           current login name and files and directories that it creates will
119           be owned by you.
120
121       ·   --verbose
122
123           Verbose mode. Print more information about what the program does.
124
125       ·   --windows
126
127           For internal use. This option is used for creating Windows
128           distributions.
129
131       Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.,
132       2010-2019 MariaDB Foundation
133
134       This documentation is free software; you can redistribute it and/or
135       modify it only under the terms of the GNU General Public License as
136       published by the Free Software Foundation; version 2 of the License.
137
138       This documentation is distributed in the hope that it will be useful,
139       but WITHOUT ANY WARRANTY; without even the implied warranty of
140       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
141       General Public License for more details.
142
143       You should have received a copy of the GNU General Public License along
144       with the program; if not, write to the Free Software Foundation, Inc.,
145       51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see
146       http://www.gnu.org/licenses/.
147
148

SEE ALSO

150       For more information, please refer to the MariaDB Knowledge Base,
151       available online at https://mariadb.com/kb/
152

AUTHOR

154       MariaDB Foundation (http://www.mariadb.org/).
155
156
157
158MariaDB 10.3                     4 April 2019              MYSQL_INSTALL_DB(1)
Impressum