Initialize Mysql Data Directory; 4.4.6. Mysql_Install_Db - Oracle 5.0 Reference Manual

Table of Contents

Advertisement

On Windows systems, MySQL distributions include a
script that you can run using the
\Program Files\MySQL\MySQL Server
C:\>
cd "C:\Program Files\MySQL\MySQL Server 5.0"
C:\>
bin\mysql -u root -p mysql
mysql>
SOURCE share/mysql_fix_privilege_tables.sql
The
mysql
If your installation is located in some other directory, adjust the path names appropriately.
As with the Unix procedure, you might see some
processes the statements in the
After running the script, stop the server and restart it.
4.4.6.
mysql_install_db
mysql_install_db
contains, if they do not exist.
platforms.
To invoke mysql_install_db, use the following syntax:
shell>
mysql_install_db [options]
Because the MySQL server, mysqld, needs to access the data directory when it runs later, you should
either run
mysql_install_db
or run it as
root
as. It might be necessary to specify other options such as
mysql_install_db
For example:
shell>
bin/mysql_install_db --user=mysql \
--basedir=/opt/mysql/mysql \
--datadir=/opt/mysql/mysql/data
mysql_install_db
grant-tables
[123]
options
will be disabled (see
the
MYSQLD_BOOTSTRAP
enabled.
mysql_install_db
mysql_install_db
the
[mysql_install_db]
specified in the
files, see
Section 4.2.3.3, "Using Option
processing option files described at
Handling".
--basedir=path
The path to the MySQL installation directory.
--datadir=path
mysql_install_db
mysql
Note
Prior to version 5.0.38, this script is found in the
command will prompt you for the
mysql_fix_privilege_tables.sql

— Initialize MySQL Data Directory

initializes the MySQL data directory and creates the system tables that it
mysql_install_db
from the same system account that will be used for running
and use the
--user
does not use the correct locations for the installation directory or data directory.
needs to invoke
[420]
options. If MySQL was configured with the
configuration option,
Section 2.17.3, "MySQL Source-Configuration
environment variable to the full path name of a server that has all options
will use that server.
supports the following options, which can be specified on the command line or in
group of an option file. (Options that are common to
group.) Other options are passed to mysqld. For information about option
[mysqld]
[258]
[258],
--ldata=path

— Initialize MySQL Data Directory

mysql_fix_privilege_tables.sql
client. For example, if your MySQL installation is located at
5.0, the commands look like this:
password; enter it when prompted.
root
Duplicate column name
is a shell script and is available only on Unix
[259]
option to indicate the user name that
--basedir
with the
mysqld
--bootstrap
[402]
and
--bootstrap
Files".
mysql_install_db
Section 4.2.3.4, "Command-Line Options that Affect Option-File
[258]
258
directory.
scripts
warnings as
script; you can ignore them.
mysqld
[258]
or
--datadir
[402]
and
--skip-
--disable-grant-
--skip-grant-tables
Options"). To handle this, set
mysqld
also supports the options for
SQL
C:
mysql
mysqld
will run
[258]
if
[420]
can also be

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 5.0 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Mysql 5.0

Table of Contents