1MYSQL_INSTALL_DB()                                          MYSQL_INSTALL_DB()
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       ·   --force
74
75           Cause mysql_install_db to run even if DNS does not work. In that
76           case, grant table entries that normally use host names will use IP
77           addresses.
78
79       ·   --help
80
81           Display a help message and exit.
82
83       ·   --no-defaults
84
85           Do not read default options from any option file. This must be
86           given as the first argument.
87
88       ·   --print-defaults
89
90           Print the program argument list and exit.  This must be given as
91           the first argument.
92
93       ·   --rpm
94
95           For internal use. This option is used by RPM files during the
96           MariaDB installation process.
97
98       ·   --skip-name-resolve
99
100           Use IP addresses rather than host names when creating grant table
101           entries. This option can be useful if your DNS does not work.
102
103       ·   --srcdir=path
104
105           For internal use. The directory under which mysql_install_db looks
106           for support files such as the error message file and the file for
107           populating the help tables.4.
108
109       ·   --user=user_name
110
111           The login user name to use for running mysqld. Files and
112           directories created by mysqld will be owned by this user. You must
113           be root to use this option. By default, mysqld runs using your
114           current login name and files and directories that it creates will
115           be owned by you.
116
117       ·   --verbose
118
119           Verbose mode. Print more information about what the program does.
120
121       ·   --windows
122
123           For internal use. This option is used for creating Windows
124           distributions.
125
127       Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.,
128       2010-2015 MariaDB Foundation
129
130       This documentation is free software; you can redistribute it and/or
131       modify it only under the terms of the GNU General Public License as
132       published by the Free Software Foundation; version 2 of the License.
133
134       This documentation is distributed in the hope that it will be useful,
135       but WITHOUT ANY WARRANTY; without even the implied warranty of
136       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
137       General Public License for more details.
138
139       You should have received a copy of the GNU General Public License along
140       with the program; if not, write to the Free Software Foundation, Inc.,
141       51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see
142       http://www.gnu.org/licenses/.
143
144

SEE ALSO

146       For more information, please refer to the MariaDB Knowledge Base,
147       available online at https://mariadb.com/kb/
148

AUTHOR

150       MariaDB Foundation (http://www.mariadb.org/).
151
152
153
154                                                            MYSQL_INSTALL_DB()
Impressum