(mysql.info.gz) mysql_install_db
Info Catalog
(mysql.info.gz) Unix post-installation
(mysql.info.gz) Unix post-installation
(mysql.info.gz) Automatic start
2.9.2.1 Problems Running `mysql_install_db'
...........................................
The purpose of the `mysql_install_db' script is to generate new MySQL
privilege tables. It will not overwrite existing MySQL privilege
tables, and it will not affect any other data.
If you want to re-create your privilege tables, first stop the `mysqld'
server if it's running. Then rename the `mysql' directory under the
data directory to save it, and then run `mysql_install_db'. For
example:
shell> mv mysql-data-directory/mysql mysql-data-directory/mysql-old
shell> mysql_install_db --user=mysql
This section lists problems you might encounter when you run
`mysql_install_db':
*`mysql_install_db' doesn't install the grant tables*
You may find that `mysql_install_db' fails to install the grant
tables and terminates after displaying the following messages:
Starting mysqld daemon with databases from XXXXXX
mysqld ended
In this case, you should examine the error log file very
carefully. The log should be located in the directory `XXXXXX'
named by the error message, and should indicate why `mysqld'
didn't start. If you don't understand what happened, include the
log when you post a bug report. Bug reports.
*There is a `mysqld' process running*
This indicates that the server is running, in which case the grant
tables have probably been created. If so, you don't have to run
`mysql_install_db' at all because it need be run only once (when
you install MySQL the first time).
*Installing a second `mysqld' server doesn't work when one server is running*
This can happen when you have an existing MySQL installation, but
want to put a new installation in a different location. For
example, you might have a production installation, but you want to
create a second installation for testing purposes. Generally the
problem that occurs when you try to run a second server is that it
tries to use a network interface that is in use by the first
server. In this case, you will see one of the following error
messages:
Can't start server: Bind on TCP/IP port:
Address already in use
Can't start server: Bind on unix socket...
For instructions on setting up multiple servers, see
Multiple servers.
*You don't have write access to `/tmp'*
If you don't have write access to create temporary files or a Unix
socket file in the default location (the `/tmp' directory), an
error will occur when you run `mysql_install_db' or the `mysqld'
server.
You can specify different temporary directory and Unix socket file
locations by executing these commands prior to starting
`mysql_install_db' or `mysqld':
shell> TMPDIR=/some_tmp_dir/
shell> MYSQL_UNIX_PORT=/some_tmp_dir/mysql.sock
shell> export TMPDIR MYSQL_UNIX_PORT
`some_tmp_dir' should be the full pathname to some directory for
which you have write permission.
After this, you should be able to run `mysql_install_db' and start
the server with these commands:
shell> bin/mysql_install_db --user=mysql
shell> bin/mysqld_safe --user=mysql &
If `mysql_install_db' is located in the `scripts' directory,
modify the first command to use `scripts/mysql_install_db'.
See Problems with `mysql.sock' Problems with mysql.sock.
Environment variables.
Info Catalog
(mysql.info.gz) Unix post-installation
(mysql.info.gz) Unix post-installation
(mysql.info.gz) Automatic start
automatically generated byinfo2html