GNU Info

Info Node: (mysql.info)Quick install

(mysql.info)Quick install


Next: Applying patches Prev: Installing source Up: Installing source
Enter node , (file) or (file)node

Quick Installation Overview
---------------------------

The basic commands you must execute to install a MySQL source
distribution are:

     shell> groupadd mysql
     shell> useradd -g mysql mysql
     shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
     shell> cd mysql-VERSION
     shell> ./configure --prefix=/usr/local/mysql
     shell> make
     shell> make install
     shell> scripts/mysql_install_db
     shell> chown -R root  /usr/local/mysql
     shell> chown -R mysql /usr/local/mysql/var
     shell> chgrp -R mysql /usr/local/mysql
     shell> cp support-files/my-medium.cnf /etc/my.cnf
     shell> /usr/local/mysql/bin/safe_mysqld --user=mysql &

If you want have support for InnoDB tables, you should edit the
`/etc/my.cnf' file and remove the `#' character before the parameters
that starts with `innodb_...'. Note: Option files. Note: InnoDB
start.

If you start from a source RPM, then do the following:

     shell> rpm --rebuild MySQL-VERSION.src.rpm

This will make a binary RPM that you can install.

You can add new users using the `bin/mysql_setpermission' script if you
install the `DBI' and `Msql-Mysql-modules' Perl modules.

A more detailed description follows.

To install a source distribution, follow the steps below, then proceed
to Note: Post-installation, for post-installation initialization and
testing:

  1. Pick the directory under which you want to unpack the
     distribution, and move into it.

  2. Obtain a distribution file from one of the sites listed in Note:
     Getting MySQL.

  3. If you are interested in using Berkeley DB tables with MySQL, you
     will need to obtain a patched version of the Berkeley DB source
     code.  Please read the chapter on Berkeley DB tables before
     proceeding.  Note: BDB.

     MySQL source distributions are provided as compressed `tar'
     archives and have names like `mysql-VERSION.tar.gz', where
     `VERSION' is a number like 3.23.51.

  4. Add a user and group for `mysqld' to run as:

          shell> groupadd mysql
          shell> useradd -g mysql mysql

     These commands add the `mysql' group, and the `mysql' user.  The
     syntax for `useradd' and `groupadd' may differ slightly on
     different versions of Unix.  They may also be called `adduser' and
     `addgroup'.  You may wish to call the user and group something
     else instead of `mysql'.

  5. Unpack the distribution into the current directory:
          shell> gunzip < /path/to/mysql-VERSION.tar.gz | tar xvf -

     This command creates a directory named `mysql-VERSION'.

  6. Change into the top-level directory of the unpacked distribution:

          shell> cd mysql-VERSION

     Note that currently you must configure and build MySQL from this
     top-level directory.  You can not build it in a different
     directory.

  7. Configure the release and compile everything:

          shell> ./configure --prefix=/usr/local/mysql
          shell> make

     When you run `configure', you might want to specify some options.
     Run `./configure --help' for a list of options.  Note: `configure'
     options, discusses some of the more useful
     options.

     If `configure' fails, and you are going to send mail to
     <mysql@lists.mysql.com> to ask for assistance, please include any
     lines from `config.log' that you think can help solve the problem.
     Also include the last couple of lines of output from `configure'
     if `configure' aborts.  Post the bug report using the `mysqlbug'
     script.  Note: Bug reports.

     If the compile fails, see Note: Compilation problems, for help
     with a number of common problems.

  8. Install everything:

          shell> make install

     You might need to run this command as `root'.

  9. Create the MySQL grant tables (necessary only if you haven't
     installed MySQL before):

          shell> scripts/mysql_install_db

     Note that MySQL versions older than Version 3.22.10 started the
     MySQL server when you run `mysql_install_db'.  This is no longer
     true!

 10. Change ownership of binaries to `root' and ownership of the data
     directory to the user that you will run `mysqld' as:

          shell> chown -R root  /usr/local/mysql
          shell> chown -R mysql /usr/local/mysql/var
          shell> chgrp -R mysql /usr/local/mysql

     The first command changes the `owner' attribute of the files to the
     `root' user, the second one changes the `owner' attribute of the
     data directory to the `mysql' user, and the third one changes the
     `group' attribute to the `mysql' group.

 11. If you want to install support for the Perl `DBI'/`DBD' interface,
     see Note: Perl support.

 12. If you would like MySQL to start automatically when you boot your
     machine, you can copy `support-files/mysql.server' to the location
     where your system has its startup files.  More information can be
     found in the `support-files/mysql.server' script itself and in
     Note: Automatic start.

After everything has been installed, you should initialize and test your
distribution:

     shell> /usr/local/mysql/bin/safe_mysqld --user=mysql &

If that command fails immediately with `mysqld daemon ended' then you
can find some information in the file
`mysql-data-directory/'hostname'.err'.  The likely reason is that you
already have another `mysqld' server running.  Note: Multiple servers.

Note: Post-installation.


automatically generated by info2www version 1.2.2.9