Table of Contents [+/-]
End of Product Lifecycle. Active development for MySQL Database Server version 5.1 has ended. Oracle offers various support offerings which may be of interest. For details and more information, see the MySQL section of the Lifetime Support Policy for Oracle Technology Products (http://www.oracle.com/us/support/lifetime-support/index.html). Please consider upgrading to a recent version.
This chapter describes how to obtain and install MySQL. A summary of the procedure follows and later sections provide the details. If you plan to upgrade an existing version of MySQL to a newer version rather than install MySQL for the first time, see Section 2.13.1, “Upgrading MySQL”, for information about upgrade procedures and about issues that you should consider before upgrading.
If you are interested in migrating to MySQL from another database system, you may wish to read Section A.8, “MySQL 5.1 FAQ: Migration”, which contains answers to some common questions concerning migration issues.
If you are migrating from MySQL Enterprise Edition to MySQL Community Server, see Section 18.104.22.168, “Downgrading from MySQL Enterprise Edition to MySQL Community Server”.
Installation of MySQL generally follows the steps outlined here:
Determine whether MySQL runs and is supported on your platform.
Please note that not all platforms are equally suitable for running MySQL, and that not all platforms on which MySQL is known to run are officially supported by Oracle Corporation:
Choose which distribution to install.
Several versions of MySQL are available, and most are available in several distribution formats. You can choose from pre-packaged distributions containing binary (precompiled) programs or source code. When in doubt, use a binary distribution. We also provide public access to our current source tree for those who want to see our most recent developments and help us test new code. To determine which version and type of distribution you should use, see Section 2.1.1, “Choosing Which MySQL Distribution to Install”.
Download the distribution that you want to install.
For instructions, see Section 2.1.2, “How to Get MySQL”. To verify the integrity of the distribution, use the instructions in Section 2.1.3, “Verifying Package Integrity Using MD5 Checksums or GnuPG”.
Install the distribution.
To install MySQL from a binary distribution, use the instructions in Section 2.2, “Installing MySQL on Unix/Linux Using Generic Binaries”.
To install MySQL from a source distribution or from the current development source tree, use the instructions in Section 2.11, “Installing MySQL from Source”.
Perform any necessary postinstallation setup.
After installing MySQL, see Section 2.12, “Postinstallation Setup and Testing” for information about making sure the MySQL server is working properly. Also refer to the information provided in Section 2.12.2, “Securing the Initial MySQL Accounts”. This section describes how to secure the initial MySQL user accounts, which have no passwords until you assign passwords. The section applies whether you install MySQL using a binary or source distribution.
If you want to run the MySQL benchmark scripts, Perl support for MySQL must be available. See Section 2.15, “Perl Installation Notes”.
Instructions for installing MySQL on different platforms and environments is available on a platform by platform basis:
Unix, Linux, FreeBSD
For instructions on installing MySQL on most Linux and Unix
platforms using a generic binary (for example, a
.tar.gz package), see
Section 2.2, “Installing MySQL on Unix/Linux Using Generic Binaries”.
For information on building MySQL entirely from the source code distributions or the source code repositories, see Section 2.11, “Installing MySQL from Source”
For specific platform help on installation, configuration, and building from source see the corresponding platform section:
Linux, including notes on distribution specific methods, see Section 2.5, “Installing MySQL on Linux”.
Solaris and OpenSolaris, including PKG and IPS formats, see Section 2.6, “Installing MySQL on Solaris and OpenSolaris”.
Hewlett-Packard HP-UX, including the DEPOT package format, see Section 2.8, “Installing MySQL on HP-UX”.
FreeBSD, see Section 2.9, “Installing MySQL on FreeBSD”.
For instructions on installing MySQL on Microsoft Windows, using either a Zipped binary or an MSI package, see Section 2.3, “Installing MySQL on Microsoft Windows”.
For information on using the MySQL Server Instance Config Wizard, see Section 2.3.5, “Using the MySQL Server Instance Config Wizard”.
For details and instructions on building MySQL from source code using Microsoft Visual Studio, see Section 2.11.7, “Installing MySQL from Source on Windows”.
For installation on OS X, including using both the binary package and native PKG formats, see Section 2.4, “Installing MySQL on OS X”.
For information on making use of the MySQL Startup Item to automatically start and stop MySQL, see Section 2.4.4, “Installing the MySQL Startup Item”.
For information on the MySQL Preference Pane, see Section 2.4.5, “Installing and Using the MySQL Preference Pane”.
For instructions on installing, starting, and stopping MySQL on i5/OS, see Section 2.10, “Installing MySQL on i5/OS”.