"SfR Fresh" - the SfR Freeware/Shareware Archive

Member "mysql-4.0.27/Docs/INSTALL-BINARY" of archive mysql-4.0.27-win-src.zip:


As a special service "SfR Fresh" has tried to format the requested source page into HTML format using source code syntax highlighting with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
    1 2.8 Installing MySQL on Other Unix-Like Systems
    2 ===============================================
    3 
    4 This section covers the installation of MySQL binary distributions that
    5 are provided for various platforms in the form of compressed `tar'
    6 files (files with a `.tar.gz' extension). See *Note mysql-binaries::,
    7 for a detailed list.
    8 
    9 To obtain MySQL, see *Note getting-mysql::.
   10 
   11 MySQL `tar' file binary distributions have names of the form
   12 `mysql-VERSION-OS.tar.gz', where `VERSION' is a number (for example,
   13 `4.0.17'), and OS indicates the type of operating system for which the
   14 distribution is intended (for example, `pc-linux-i686').
   15 
   16 In addition to these generic packages, we also offer binaries in
   17 platform-specific package formats for selected platforms. See *Note
   18 quick-standard-installation::, for more information on how to install
   19 these.
   20 
   21 You need the following tools to install a MySQL `tar' file binary
   22 distribution:
   23 
   24    * GNU `gunzip' to uncompress the distribution.
   25 
   26    * A reasonable `tar' to unpack the distribution. GNU `tar' is known
   27      to work.  Some operating systems come with a pre-installed version
   28      of `tar' that is known to have problems. For example, Mac OS X
   29      `tar' and Sun `tar' are known to have problems with long
   30      filenames. On Mac OS X, you can use the pre-installed `gnutar'
   31      program. On other systems with a deficient `tar', you should
   32      install GNU `tar' first.
   33 
   34 If you run into problems and need to file a bug report, please use the
   35 instructions in *Note bug-reports::.
   36 
   37 The basic commands that you must execute to install and use a MySQL
   38 binary distribution are:
   39 
   40      shell> groupadd mysql
   41      shell> useradd -g mysql mysql
   42      shell> cd /usr/local
   43      shell> gunzip < /PATH/TO/MYSQL-VERSION-OS.tar.gz | tar xvf -
   44      shell> ln -s FULL-PATH-TO-MYSQL-VERSION-OS mysql
   45      shell> cd mysql
   46      shell> scripts/mysql_install_db --user=mysql
   47      shell> chown -R root  .
   48      shell> chown -R mysql data
   49      shell> chgrp -R mysql .
   50      shell> bin/mysqld_safe --user=mysql &
   51 
   52 For versions of MySQL older than 4.0, substitute `bin/safe_mysqld' for
   53 `bin/mysqld_safe' in the final command.
   54 
   55 *Note*: This procedure does not set up any passwords for MySQL
   56 accounts. After following the procedure, proceed to *Note
   57 post-installation::.
   58 
   59 A more detailed version of the preceding description for installing a
   60 binary distribution follows:
   61 
   62   1. Add a login user and group for `mysqld' to run as:
   63 
   64           shell> groupadd mysql
   65           shell> useradd -g mysql mysql
   66 
   67      These commands add the `mysql' group and the `mysql' user. The
   68      syntax for `useradd' and `groupadd' may differ slightly on
   69      different versions of Unix, or they may have different names such
   70      as `adduser' and `addgroup'.
   71 
   72      You might want to call the user and group something else instead
   73      of `mysql'. If so, substitute the appropriate name in the
   74      following steps.
   75 
   76   2. Pick the directory under which you want to unpack the distribution
   77      and change location into it. In the following example, we unpack
   78      the distribution under `/usr/local'. (The instructions, therefore,
   79      assume that you have permission to create files and directories in
   80      `/usr/local'. If that directory is protected, you must perform the
   81      installation as `root'.)
   82 
   83           shell> cd /usr/local
   84 
   85   3. Obtain a distribution file using the instructions in *Note
   86      getting-mysql::. For a given release, binary distributions for all
   87      platforms are built from the same MySQL source distribution.
   88 
   89   4. Unpack the distribution, which creates the installation directory.
   90      Then create a symbolic link to that directory:
   91 
   92           shell> gunzip < /PATH/TO/MYSQL-VERSION-OS.tar.gz | tar xvf -
   93           shell> ln -s FULL-PATH-TO-MYSQL-VERSION-OS mysql
   94 
   95      The `tar' command creates a directory named `mysql-VERSION-OS'.
   96      The `ln' command makes a symbolic link to that directory. This
   97      lets you refer more easily to the installation directory as
   98      `/usr/local/mysql'.
   99 
  100      With GNU `tar', no separate invocation of `gunzip' is necessary.
  101      You can replace the first line with the following alternative
  102      command to uncompress and extract the distribution:
  103 
  104           shell> tar zxvf /PATH/TO/MYSQL-VERSION-OS.tar.gz
  105 
  106   5. Change location into the installation directory:
  107 
  108           shell> cd mysql
  109 
  110      You will find several files and subdirectories in the `mysql'
  111      directory. The most important for installation purposes are the
  112      `bin' and `scripts' subdirectories:
  113 
  114         * The `bin' directory contains client programs and the server.
  115           You should add the full pathname of this directory to your
  116           `PATH' environment variable so that your shell finds the MySQL
  117           programs properly. See *Note environment-variables::.
  118 
  119         * The `scripts' directory contains the `mysql_install_db'
  120           script used to initialize the `mysql' database containing the
  121           grant tables that store the server access permissions.
  122 
  123   6. If you have not installed MySQL before, you must create the MySQL
  124      grant tables:
  125 
  126           shell> scripts/mysql_install_db --user=mysql
  127 
  128      If you run the command as `root', you must use the -user option as
  129      shown. The value of the option should be the name of the login
  130      account that you created in the first step to use for running the
  131      server. If you run the command while logged in as that user, you
  132      can omit the -user option.
  133 
  134      Note that for MySQL versions older than 3.22.10,
  135      `mysql_install_db' left the server running after creating the
  136      grant tables. This is no longer true; you need to restart the
  137      server after performing the remaining steps in this procedure.
  138 
  139   7. Change the ownership of program binaries to `root' and ownership
  140      of the data directory to the user that you run `mysqld' as.
  141      Assuming that you are located in the installation directory
  142      (`/usr/local/mysql'), the commands look like this:
  143 
  144           shell> chown -R root  .
  145           shell> chown -R mysql data
  146           shell> chgrp -R mysql .
  147 
  148      The first command changes the owner attribute of the files to the
  149      `root' user. The second changes the owner attribute of the data
  150      directory to the `mysql' user. The third changes the group
  151      attribute to the `mysql' group.
  152 
  153   8. If you want MySQL to start automatically when you boot your
  154      machine, you can copy `support-files/mysql.server' to the location
  155      where your system has its startup files. More information can be
  156      found in the `mysql.server' script itself, and in *Note
  157      automatic-start::.
  158 
  159   9. You can set up new accounts using the `bin/mysql_setpermission'
  160      script if you install the `DBI' and `DBD::mysql' Perl modules. For
  161      instructions, see *Note perl-support::.
  162 
  163  10. If you would like to use `mysqlaccess' and have the MySQL
  164      distribution in some non-standard location, you must change the
  165      location where `mysqlaccess' expects to find the `mysql' client.
  166      Edit the `bin/mysqlaccess' script at approximately line 18. Search
  167      for a line that looks like this:
  168 
  169           $MYSQL     = '/usr/local/bin/mysql';    # path to mysql executable
  170 
  171      Change the path to reflect the location where `mysql' actually is
  172      stored on your system. If you do not do this, a `Broken pipe' error
  173      will occur when you run `mysqlaccess'.
  174 
  175 After everything has been unpacked and installed, you should test your
  176 distribution. To start the MySQL server, use the following command:
  177 
  178      shell> bin/mysqld_safe --user=mysql &
  179 
  180 If that command fails immediately and prints `mysqld ended', you can
  181 find some information in the `HOST_NAME.err' file in the data directory.
  182 
  183 For versions of MySQL older than 4.0, substitute `bin/safe_mysqld' for
  184 `bin/mysqld_safe' in the command.
  185 
  186 More information about `mysqld_safe' is given in *Note mysqld-safe::.
  187 
  188 *Note*: The accounts that are listed in the MySQL grant tables
  189 initially have no passwords.  After starting the server, you should set
  190 up passwords for them using the instructions in *Note
  191 post-installation::.
  192