Oracle 5.0 Reference Manual page 148

Table of Contents

Advertisement

1. Change location into the top-level directory of your MySQL installation, represented here by
BASEDIR:
shell>
cd BASEDIR
is the installation directory for your MySQL instance. It is likely to be something like
BASEDIR
usr/local/mysql
to this directory.
You will find several files and subdirectories in the
installation purposes are the
• The
directory contains client programs and the server. You should add the full path name
bin
of this directory to your
properly. See
Section 2.21, "Environment
For some distribution types,
• The
directory contains the
scripts
database containing the grant tables that store the server access permissions.
For some distribution types,
2. If necessary, ensure that the distribution contents are accessible to mysql. If you unpacked the
distribution as mysql, no further action is required. If you unpacked the distribution as root,
its contents will be owned by root. Change its ownership to
commands as
root
shell>
chown -R mysql .
shell>
chgrp -R mysql .
The first command changes the owner attribute of the files to the
the group attribute to the
3. If necessary, run the
containing the privileges that determine how users are permitted to connect to the server. You will
need to do this if you used a distribution type for which the installation procedure does not run the
program for you.
Typically,
mysql_install_db
skip this step if you are upgrading an existing installation, However,
overwrite any existing privilege tables, so it should be safe to run in any circumstances.
The exact location of
To initialize the grant tables, use one of the following commands, depending on whether
mysql_install_db
shell>
bin/mysql_install_db --user=mysql
shell>
scripts/mysql_install_db --user=mysql
It might be necessary to specify other options such as
if
mysql_install_db
directory. For example:
shell>
bin/mysql_install_db --user=mysql \
--basedir=/opt/mysql/mysql \
--datadir=/opt/mysql/mysql/data
The
mysql_install_db
Under the data directory, it creates directories for the
and the
database that you can use to test MySQL. The script also creates privilege table
test
entries for
and anonymous-user accounts. The accounts have no passwords initially.
root
Unix Postinstallation Procedures
or /usr/local. The following steps assume that you have changed location
and
bin
scripts
environment variable so that your shell finds the MySQL programs
PATH
is in the
mysqld
mysql_install_db
mysql_install_db
in the installation directory:
group.
mysql
mysql_install_db
needs to be run only the first time you install MySQL, so you can
mysql_install_db
is located in the
bin
does not identify the correct locations for the installation directory or data
script creates the server's data directory with
128
directory. The most important for
BASEDIR
subdirectories:
Variables".
directory.
libexec
script used to initialize the
is in the
bin
mysql
mysql
program to set up the initial MySQL grant tables
will depends on the layout for your given installation.
or
directory:
scripts
--basedir
database that holds the grant tables
mysql
mysql
directory.
by executing the following
user. The second changes
mysql_install_db
[258]
or
[258]
--datadir
as the owner.
mysql
/
does not

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents