Installing MySQL from Generic Binaries on Other Unix-Like Systems
107
2.16. Installing MySQL from Generic Binaries on Other Unix-Like
Systems
Oracle provides a set of binary distributions of MySQL. These include binary distributions in the form of
compressed
tar
files (files with a
.tar.gz
extension) for a number of platforms, as well as binaries in
platform-specific package formats for selected platforms.
This section covers the installation of MySQL from a compressed
tar
file binary distribution. For other
platform-specific package formats, see the other platform-specific sections. For example, for Windows
distributions, see
Section 2.10, “Installing MySQL on Microsoft Windows”
.
To obtain MySQL, see
Section 2.5, “How to Get MySQL”
.
MySQL compressed
tar
file binary distributions have names of the form
mysql-VERSION-OS.tar.gz
, where
VERSION
is a number (for example,
5.0.96
), and
OS
indicates
the type of operating system for which the distribution is intended (for example,
pc-linux-i686
or
winx64
).
To install MySQL from a compressed
tar
file binary distribution, your system must have GNU
gunzip
to uncompress the distribution and a reasonable
tar
to unpack it. If your
tar
program supports the
z
option, it can both uncompress and unpack the file.
GNU
tar
is known to work. The standard
tar
provided with some operating systems is not able to
unpack the long file names in the MySQL distribution. You should download and install GNU
tar
, or if
available, use a preinstalled version of GNU tar. Usually this is available as
gnutar
,
gtar
, or as
tar
within a GNU or Free Software directory, such as
/usr/sfw/bin
or
/usr/local/bin
. GNU
tar
is
available from
http://www.gnu.org/software/tar/
.
Warning
If you have previously installed MySQL using your operating system native
package management system, such as
yum
or
apt-get
, you may experience
problems installing using a native binary. Make sure your previous MySQL
previous installation has been removed entirely (using your package
management system), and that any additional files, such as old versions of your
data files, have also been removed. You should also check the existence of
configuration files such as
/etc/my.cnf
or the
/etc/mysql
directory have
been deleted.
If you run into problems and need to file a bug report, please use the instructions in
Section 1.7, “How
to Report Bugs or Problems”
.
To install and use a MySQL binary distribution, the basic command sequence looks like this:
shell>
groupadd mysql
shell>
useradd -r -g mysql mysql
shell>
cd /usr/local
shell>
tar zxvf /path/to/mysql-VERSION-OS.tar.gz
shell>
ln -s full-path-to-mysql-VERSION-OS mysql
shell>
cd mysql
shell>
chown -R mysql .
shell>
chgrp -R mysql .
shell>
scripts/mysql_install_db --user=mysql
shell>
chown -R root .
shell>
chown -R mysql data
# Next command is optional
shell>
cp support-files/my-medium.cnf /etc/my.cnf
shell>
bin/mysqld_safe --user=mysql &
# Next command is optional
shell>
cp support-files/mysql.server /etc/init.d/mysql.server
A more detailed version of the preceding description for installing a binary distribution follows.
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...