GNU Info

Info Node: (mysql.info)mysql_install_db

(mysql.info)mysql_install_db


Next: Starting server Prev: Post-installation Up: Post-installation
Enter node , (file) or (file)node

Problems Running `mysql_install_db'
-----------------------------------

The purpose of the `mysql_install_db' script is to generate new MySQL
privilege tables.  It will not affect any other data!  It will also not
do anything if you already have MySQL privilege tables installed!

If you want to re-create your privilege tables, you should take down
the `mysqld' server, if it's running, and then do something like:

     mv mysql-data-directory/mysql mysql-data-directory/mysql-old
     mysql_install_db

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
          mysql daemon ended

     In this case, you should examine the 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 using `mysqlbug'!  Note: Bug reports.

*There is already a `mysqld' daemon running*
     In this case, you probably don't have to run `mysql_install_db' at
     all.  You have to run `mysql_install_db' only once, when you
     install MySQL the first time.

*Installing a second `mysqld' daemon doesn't work when one daemon is running*
     This can happen when you already have an existing MySQL
     installation, but want to put a new installation in a different
     place (for example, for testing, or perhaps you simply want to run
     two installations at the same time).  Generally the problem that
     occurs when you try to run the second server is that it tries to
     use the same socket and port as the old one.  In this case you
     will get the error message: `Can't start server: Bind on TCP/IP
     port: Address already in use' or `Can't start server : Bind on
     unix socket...'. Note: Installing many servers.

*You don't have write access to `/tmp'*
     If you don't have write access to create a socket file at the
     default place (in `/tmp') or permission to create temporary files
     in `/tmp,' you will get an error when running `mysql_install_db'
     or when starting or using `mysqld'.

     You can specify a different socket and temporary directory as
     follows:

          shell> TMPDIR=/some_tmp_dir/
          shell> MYSQL_UNIX_PORT=/some_tmp_dir/mysqld.sock
          shell> export TMPDIR MYSQL_UNIX_PORT

     *Note Problems with mysql.sock::.

     `some_tmp_dir' should be the path to some directory for which you
     have write permission. Note: Environment variables.

     After this you should be able to run `mysql_install_db' and start
     the server with these commands:

          shell> scripts/mysql_install_db
          shell> BINDIR/safe_mysqld &

*`mysqld' crashes immediately*
     If you are running RedHat Version 5.0 with a version of `glibc'
     older than 2.0.7-5, you should make sure you have installed all
     `glibc' patches!  There is a lot of information about this in the
     MySQL mail archives.  Links to the mail archives are available
     online at `http://www.mysql.com/documentation/'.  Also, see Note:
     Linux.

     You can also start `mysqld' manually using the
     `--skip-grant-tables' option and add the privilege information
     yourself using `mysql':

          shell> BINDIR/safe_mysqld --skip-grant-tables &
          shell> BINDIR/mysql -u root mysql

     From `mysql', manually execute the SQL commands in
     `mysql_install_db'.  Make sure you run `mysqladmin
     flush-privileges' or `mysqladmin reload' afterward to tell the
     server to reload the grant tables.


automatically generated by info2www version 1.2.2.9