2
3
4
6 mysql_install_db - MySQL data directory initialization script
7
9 mysql_install_db [options]
10
12 mysql_install_db initializes the MySQL data directory and creates the
13 system tables that it contains, if they do not exist. Because the MySQL
14 server, mysqld, needs to access the data directory when it runs later,
15 you should either run mysql_install_db from the same account that will
16 be used for running mysqld or run it as root and use the --user option
17 to indicate the username that mysqld will run as.
18
19 To invoke mysql_install_db, use the following syntax:
20
21 shell> mysql_install_db [options]
22
23 mysql_install_db needs to invoke mysqld with the --bootstrap and
24 --skip-grant-tables options (see Section 4.14.2, “Typical configure
25 Options”). If MySQL was configured with the --disable-grant-options
26 option, --bootstrap and --skip-grant-tables will be disabled. To handle
27 this, set the MYSQLD_BOOTSTRAP environment variable to the full
28 pathname of a server that has all options enabled. mysql_install_db
29 will use that server.
30
31 mysql_install_db supports the following options:
32
33 · --basedir=path
34
35 The path to the MySQL installation directory.
36
37 · --force
38
39 Causes mysql_install_db to run even if DNS does not work. In that
40 case, grant table entries that normally use hostnames will use IP
41 addresses.
42
43 · --datadir=path, --ldata=path
44
45 The path to the MySQL data directory.
46
47 · --rpm
48
49 For internal use. This option is used by RPM files during the MySQL
50 installation process.
51
52 · --skip-name-resolve
53
54 Use IP addresses rather than hostnames when creating grant table
55 entries. This option can be useful if your DNS does not work.
56
57 · --srcdir=path
58
59 For internal use. The directory under which mysql_install_db looks
60 for support files such as the error message file and the file for
61 populating the help tables. This option was added in MySQL 5.0.32.
62
63 · --user=user_name
64
65 The login username to use for running mysqld. Files and directories
66 created by mysqld will be owned by this user. You must be root to
67 use this option. By default, mysqld runs using your current login
68 name and files and directories that it creates will be owned by you.
69
70 · --verbose
71
72 Verbose mode. Print more information about what the program does.
73
74 · --windows
75
76 For internal use. This option is used for creating Windows
77 distributions.
78
80 Copyright 1997-2007 MySQL AB
81
82 This documentation is NOT distributed under a GPL license. Use of this
83 documentation is subject to the following terms: You may create a
84 printed copy of this documentation solely for your own personal use.
85 Conversion to other formats is allowed as long as the actual content is
86 not altered or edited in any way. You shall not publish or distribute
87 this documentation in any form or on any media, except if you
88 distribute the documentation in a manner similar to how MySQL
89 disseminates it (that is, electronically for download on a Web site
90 with the software) or on a CD-ROM or similar medium, provided however
91 that the documentation is disseminated together with the software on
92 the same medium. Any other use, such as any dissemination of printed
93 copies or use of this documentation, in whole or in part, in another
94 publication, requires the prior written consent from an authorized
95 representative of MySQL AB. MySQL AB reserves any and all rights to
96 this documentation not expressly granted above.
97
98 Please email <docs@mysql.com> for more information.
99
101 For more information, please refer to the MySQL Reference Manual, which
102 may already be installed locally and which is also available online at
103 http://dev.mysql.com/doc/.
104
106 MySQL AB (http://www.mysql.com/). This software comes with no
107 warranty.
108
109
110