INSTALL-SOURCE | INSTALL-SOURCE | |||
---|---|---|---|---|
skipping to change at line 44 | skipping to change at line 44 | |||
2.1.2, "Choosing Which MySQL Distribution to Install." | 2.1.2, "Choosing Which MySQL Distribution to Install." | |||
3. Download the distribution that you want to install. | 3. Download the distribution that you want to install. | |||
For instructions, see Section 2.1.3, "How to Get MySQL." To | For instructions, see Section 2.1.3, "How to Get MySQL." To | |||
verify the integrity of the distribution, use the instructions | verify the integrity of the distribution, use the instructions | |||
in Section 2.1.4, "Verifying Package Integrity Using MD5 | in Section 2.1.4, "Verifying Package Integrity Using MD5 | |||
Checksums or GnuPG." | Checksums or GnuPG." | |||
4. Install the distribution. | 4. Install the distribution. | |||
To install MySQL from a binary distribution, use the | To install MySQL from a binary distribution, use the | |||
instructions in Section 2.2, "Installing MySQL from Generic | instructions in Section 2.2, "Installing MySQL on Unix/Linux | |||
Binaries on Unix/Linux." | Using Generic Binaries." | |||
To install MySQL from a source distribution or from the | To install MySQL from a source distribution or from the | |||
current development source tree, use the instructions in | current development source tree, use the instructions in | |||
Section 2.9, "Installing MySQL from Source." | Section 2.9, "Installing MySQL from Source." | |||
5. Perform any necessary postinstallation setup. | 5. Perform any necessary postinstallation setup. | |||
After installing MySQL, read Section 2.10, "Postinstallation | After installing MySQL, read Section 2.10, "Postinstallation | |||
Setup and Testing." This section contains important | Setup and Testing." This section contains important | |||
information about making sure the MySQL server is working | information about making sure the MySQL server is working | |||
properly. It also describes how to secure the initial MySQL | properly. It also describes how to secure the initial MySQL | |||
user accounts, which have no passwords until you assign | user accounts, which have no passwords until you assign | |||
skipping to change at line 69 | skipping to change at line 69 | |||
6. If you want to run the MySQL benchmark scripts, Perl support | 6. If you want to run the MySQL benchmark scripts, Perl support | |||
for MySQL must be available. See Section 2.13, "Perl | for MySQL must be available. See Section 2.13, "Perl | |||
Installation Notes." | Installation Notes." | |||
Instructions for installing MySQL on different platforms and | Instructions for installing MySQL on different platforms and | |||
environments is available on a platform by platform basis: | environments is available on a platform by platform basis: | |||
* Unix, Linux, FreeBSD | * Unix, Linux, FreeBSD | |||
For instructions on installing MySQL on most Linux and Unix | For instructions on installing MySQL on most Linux and Unix | |||
platforms using a generic binary (for example, a .tar.gz | platforms using a generic binary (for example, a .tar.gz | |||
package), see Section 2.2, "Installing MySQL from Generic | package), see Section 2.2, "Installing MySQL on Unix/Linux | |||
Binaries on Unix/Linux." | Using Generic Binaries." | |||
For information on building MySQL entirely from the source | For information on building MySQL entirely from the source | |||
code distributions or the source code repositories, see | code distributions or the source code repositories, see | |||
Section 2.9, "Installing MySQL from Source" | Section 2.9, "Installing MySQL from Source" | |||
For specific platform help on installation, configuration, and | For specific platform help on installation, configuration, and | |||
building from source see the corresponding platform section: | building from source see the corresponding platform section: | |||
+ Linux, including notes on distribution specific methods, | + Linux, including notes on distribution specific methods, | |||
see Section 2.5, "Installing MySQL on Linux." | see Section 2.5, "Installing MySQL on Linux." | |||
+ Solaris and OpenSolaris, including PKG and IPS formats, | + Solaris and OpenSolaris, including PKG and IPS formats, | |||
skipping to change at line 117 | skipping to change at line 117 | |||
For information on the MySQL Preference Pane, see Section | For information on the MySQL Preference Pane, see Section | |||
2.4.4, "Installing and Using the MySQL Preference Pane." | 2.4.4, "Installing and Using the MySQL Preference Pane." | |||
2.1. General Installation Guidance | 2.1. General Installation Guidance | |||
The immediately following sections contain the information | The immediately following sections contain the information | |||
necessary to choose, download, and verify your distribution. The | necessary to choose, download, and verify your distribution. The | |||
instructions in later sections of the chapter describe how to | instructions in later sections of the chapter describe how to | |||
install the distribution that you choose. For binary | install the distribution that you choose. For binary | |||
distributions, see the instructions at Section 2.2, "Installing | distributions, see the instructions at Section 2.2, "Installing | |||
MySQL from Generic Binaries on Unix/Linux" or the corresponding | MySQL on Unix/Linux Using Generic Binaries" or the corresponding | |||
section for your platform if available. To build MySQL from | section for your platform if available. To build MySQL from | |||
source, use the instructions in Section 2.9, "Installing MySQL | source, use the instructions in Section 2.9, "Installing MySQL | |||
from Source." | from Source." | |||
2.1.1. Operating Systems Supported by MySQL Community Server | 2.1.1. Operating Systems Supported by MySQL Community Server | |||
This section lists the operating systems on which MySQL Community | This section lists the operating systems on which MySQL Community | |||
Server is known to run. | Server is known to run. | |||
Important | Important | |||
skipping to change at line 268 | skipping to change at line 268 | |||
releases. | releases. | |||
We do not use a complete code freeze because this prevents us from | We do not use a complete code freeze because this prevents us from | |||
making bugfixes and other fixes that must be done. We may add | making bugfixes and other fixes that must be done. We may add | |||
small things that should not affect anything that currently works | small things that should not affect anything that currently works | |||
in a production release. Naturally, relevant bugfixes from an | in a production release. Naturally, relevant bugfixes from an | |||
earlier series propagate to later series. | earlier series propagate to later series. | |||
If you want to use the very latest sources containing all current | If you want to use the very latest sources containing all current | |||
patches and bugfixes, you can use one of our source code | patches and bugfixes, you can use one of our source code | |||
repositories (see Section 2.9.3, "Installing MySQL from a | repositories (see Section 2.9.3, "Installing MySQL Using a | |||
Development Source Tree"). These are not "releases" as such, but | Development Source Tree"). These are not "releases" as such, but | |||
are available as previews of the code on which future releases are | are available as previews of the code on which future releases are | |||
to be based. | to be based. | |||
The naming scheme in MySQL 5.6 uses release names that consist of | The naming scheme in MySQL 5.6 uses release names that consist of | |||
three numbers and a suffix; for example, mysql-5.6.1-m1. The | three numbers and a suffix; for example, mysql-5.6.1-m1. The | |||
numbers within the release name are interpreted as follows: | numbers within the release name are interpreted as follows: | |||
* The first number (5) is the major version and describes the | * The first number (5) is the major version and describes the | |||
file format. All MySQL 5 releases have the same file format. | file format. All MySQL 5 releases have the same file format. | |||
skipping to change at line 332 | skipping to change at line 332 | |||
All releases of MySQL are run through our standard tests and | All releases of MySQL are run through our standard tests and | |||
benchmarks to ensure that they are relatively safe to use. Because | benchmarks to ensure that they are relatively safe to use. Because | |||
the standard tests are extended over time to check for all | the standard tests are extended over time to check for all | |||
previously found bugs, the test suite keeps getting better. | previously found bugs, the test suite keeps getting better. | |||
All releases have been tested at least with these tools: | All releases have been tested at least with these tools: | |||
* An internal test suite. The mysql-test directory contains an | * An internal test suite. The mysql-test directory contains an | |||
extensive set of test cases. We run these tests for every | extensive set of test cases. We run these tests for every | |||
server binary. See Section 22.1.2, "The MySQL Test Suite," for | server binary. See Section 23.1.2, "The MySQL Test Suite," for | |||
more information about this test suite. | more information about this test suite. | |||
* The MySQL benchmark suite. This suite runs a range of common | * The MySQL benchmark suite. This suite runs a range of common | |||
queries. It is also a test to determine whether the latest | queries. It is also a test to determine whether the latest | |||
batch of optimizations actually made the code faster. See | batch of optimizations actually made the code faster. See | |||
Section 8.12.2, "The MySQL Benchmark Suite." | Section 8.12.2, "The MySQL Benchmark Suite." | |||
We also perform additional integration and nonfunctional testing | We also perform additional integration and nonfunctional testing | |||
of the latest MySQL version in our internal production | of the latest MySQL version in our internal production | |||
environment. Integration testing is done with different | environment. Integration testing is done with different | |||
skipping to change at line 356 | skipping to change at line 356 | |||
performance, concurrency, stress, high volume, upgrade and | performance, concurrency, stress, high volume, upgrade and | |||
downgrade. | downgrade. | |||
2.1.2.2. Choosing a Distribution Format | 2.1.2.2. Choosing a Distribution Format | |||
After choosing which version of MySQL to install, you should | After choosing which version of MySQL to install, you should | |||
decide whether to use a binary distribution or a source | decide whether to use a binary distribution or a source | |||
distribution. In most cases, you should probably use a binary | distribution. In most cases, you should probably use a binary | |||
distribution, if one exists for your platform. Binary | distribution, if one exists for your platform. Binary | |||
distributions are available in native format for many platforms, | distributions are available in native format for many platforms, | |||
such as RPM files for Linux or PKG package installers for Mac OS X | such as RPM packages for Linux, DMG packages for Mac OS X, and PKG | |||
or Solaris. Distributions also are available as Zip archives or | packages for Solaris. Distributions are also available in more | |||
compressed tar files. | generic formats such as Zip archives or compressed tar files. | |||
Reasons to choose a binary distribution include the following: | Reasons to choose a binary distribution include the following: | |||
* Binary distributions generally are easier to install than | * Binary distributions generally are easier to install than | |||
source distributions. | source distributions. | |||
* To satisfy different user requirements, we provide several | * To satisfy different user requirements, we provide several | |||
servers in binary distributions. mysqld is an optimized server | servers in binary distributions. mysqld is an optimized server | |||
that is a smaller, faster binary. mysqld-debug is compiled | that is a smaller, faster binary. mysqld-debug is compiled | |||
with debugging support. | with debugging support. | |||
skipping to change at line 393 | skipping to change at line 393 | |||
available that might not be included in the standard binary | available that might not be included in the standard binary | |||
distributions. Here is a list of the most common extra options | distributions. Here is a list of the most common extra options | |||
that you may want to use to ensure feature availability: | that you may want to use to ensure feature availability: | |||
+ -DWITH_LIBWRAP=1 for TCP wrappers support. | + -DWITH_LIBWRAP=1 for TCP wrappers support. | |||
+ -DWITH_ZLIB={system|bundled} for features that depend on | + -DWITH_ZLIB={system|bundled} for features that depend on | |||
compression | compression | |||
+ -DWITH_DEBUG=1 for debugging support | + -DWITH_DEBUG=1 for debugging support | |||
For additional information, see Section 2.9.4, "MySQL | ||||
Source-Configuration Options." | ||||
* You want to configure mysqld without some features that are | * You want to configure mysqld without some features that are | |||
included in the standard binary distributions. For example, | included in the standard binary distributions. For example, | |||
distributions normally are compiled with support for all | distributions normally are compiled with support for all | |||
character sets. If you want a smaller MySQL server, you can | character sets. If you want a smaller MySQL server, you can | |||
recompile it with support for only the character sets you | recompile it with support for only the character sets you | |||
need. | need. | |||
* You want to use the latest sources from one of the Bazaar | * You want to use the latest sources from one of the Bazaar | |||
repositories to have access to all current bugfixes. For | repositories to have access to all current bugfixes. For | |||
skipping to change at line 466 | skipping to change at line 468 | |||
2.1.3. How to Get MySQL | 2.1.3. How to Get MySQL | |||
Check our downloads page at http://dev.mysql.com/downloads/ for | Check our downloads page at http://dev.mysql.com/downloads/ for | |||
information about the current version of MySQL and for downloading | information about the current version of MySQL and for downloading | |||
instructions. For a complete up-to-date list of MySQL download | instructions. For a complete up-to-date list of MySQL download | |||
mirror sites, see http://dev.mysql.com/downloads/mirrors.html. You | mirror sites, see http://dev.mysql.com/downloads/mirrors.html. You | |||
can also find information there about becoming a MySQL mirror site | can also find information there about becoming a MySQL mirror site | |||
and how to report a bad or out-of-date mirror. | and how to report a bad or out-of-date mirror. | |||
To obtain the latest development source, see Section 2.9.3, | To obtain the latest development source, see Section 2.9.3, | |||
"Installing MySQL from a Development Source Tree." | "Installing MySQL Using a Development Source Tree." | |||
2.1.4. Verifying Package Integrity Using MD5 Checksums or GnuPG | 2.1.4. Verifying Package Integrity Using MD5 Checksums or GnuPG | |||
After you have downloaded the MySQL package that suits your needs | After you have downloaded the MySQL package that suits your needs | |||
and before you attempt to install it, you should make sure that it | and before you attempt to install it, you should make sure that it | |||
is intact and has not been tampered with. There are three means of | is intact and has not been tampered with. There are three means of | |||
integrity checking: | integrity checking: | |||
* MD5 checksums | * MD5 checksums | |||
skipping to change at line 513 | skipping to change at line 515 | |||
also download the source code from | also download the source code from | |||
http://www.gnu.org/software/textutils/. If you have OpenSSL | http://www.gnu.org/software/textutils/. If you have OpenSSL | |||
installed, you can use the command openssl md5 package_name | installed, you can use the command openssl md5 package_name | |||
instead. A Windows implementation of the md5 command line utility | instead. A Windows implementation of the md5 command line utility | |||
is available from http://www.fourmilab.ch/md5/. winMd5Sum is a | is available from http://www.fourmilab.ch/md5/. winMd5Sum is a | |||
graphical MD5 checking tool that can be obtained from | graphical MD5 checking tool that can be obtained from | |||
http://www.nullriver.com/index/products/winmd5sum. Our Microsoft | http://www.nullriver.com/index/products/winmd5sum. Our Microsoft | |||
Windows examples will assume the name md5.exe. | Windows examples will assume the name md5.exe. | |||
Linux and Microsoft Windows examples: | Linux and Microsoft Windows examples: | |||
shell> md5sum mysql-standard-5.6.12-linux-i686.tar.gz | shell> md5sum mysql-standard-5.6.13-linux-i686.tar.gz | |||
aaab65abbec64d5e907dcd41b8699945 mysql-standard-5.6.12-linux-i686.ta | aaab65abbec64d5e907dcd41b8699945 mysql-standard-5.6.13-linux-i686.ta | |||
r.gz | r.gz | |||
shell> md5.exe mysql-installer-community-5.6.12.msi | shell> md5.exe mysql-installer-community-5.6.13.msi | |||
aaab65abbec64d5e907dcd41b8699945 mysql-installer-community-5.6.12.ms | aaab65abbec64d5e907dcd41b8699945 mysql-installer-community-5.6.13.ms | |||
i | i | |||
You should verify that the resulting checksum (the string of | You should verify that the resulting checksum (the string of | |||
hexadecimal digits) matches the one displayed on the download page | hexadecimal digits) matches the one displayed on the download page | |||
immediately below the respective package. | immediately below the respective package. | |||
Note | Note | |||
Make sure to verify the checksum of the archive file (for example, | Make sure to verify the checksum of the archive file (for example, | |||
the .zip, .tar.gz, or .msi file) and not of the files that are | the .zip, .tar.gz, or .msi file) and not of the files that are | |||
contained inside of the archive. In other words, verify the file | contained inside of the archive. In other words, verify the file | |||
skipping to change at line 627 | skipping to change at line 629 | |||
see Section 2.1.4.4, "Signature Checking Using RPM." | see Section 2.1.4.4, "Signature Checking Using RPM." | |||
After you have downloaded and imported the public build key, | After you have downloaded and imported the public build key, | |||
download your desired MySQL package and the corresponding | download your desired MySQL package and the corresponding | |||
signature, which also is available from the download page. The | signature, which also is available from the download page. The | |||
signature file has the same name as the distribution file with an | signature file has the same name as the distribution file with an | |||
.asc extension, as shown by the examples in the following table. | .asc extension, as shown by the examples in the following table. | |||
Table 2.1. MySQL Package and Signature Files for Source files | Table 2.1. MySQL Package and Signature Files for Source files | |||
File Type File Name | File Type File Name | |||
Distribution file mysql-standard-5.6.12-linux-i686.tar.gz | Distribution file mysql-standard-5.6.13-linux-i686.tar.gz | |||
Signature file mysql-standard-5.6.12-linux-i686.tar.gz.asc | Signature file mysql-standard-5.6.13-linux-i686.tar.gz.asc | |||
Make sure that both files are stored in the same directory and | Make sure that both files are stored in the same directory and | |||
then run the following command to verify the signature for the | then run the following command to verify the signature for the | |||
distribution file: | distribution file: | |||
shell> gpg --verify package_name.asc | shell> gpg --verify package_name.asc | |||
If the downloaded package is valid, you will see a "Good | If the downloaded package is valid, you will see a "Good | |||
signature" similar to: | signature" similar to: | |||
shell> gpg --verify mysql-standard-5.6.12-linux-i686.tar.gz.asc | shell> gpg --verify mysql-standard-5.6.13-linux-i686.tar.gz.asc | |||
gpg: Signature made Tue 01 Feb 2011 02:38:30 AM CST using DSA key ID | gpg: Signature made Tue 01 Feb 2011 02:38:30 AM CST using DSA key ID | |||
5072E1F5 | 5072E1F5 | |||
gpg: Good signature from "MySQL Release Engineering <mysql-build@oss. | gpg: Good signature from "MySQL Release Engineering <mysql-build@oss. | |||
oracle.com>" | oracle.com>" | |||
The Good signature message indicates that the file signature is | The Good signature message indicates that the file signature is | |||
valid, when compared to the signature listed on our site. But you | valid, when compared to the signature listed on our site. But you | |||
might also see warnings, like so: | might also see warnings, like so: | |||
shell> gpg --verify mysql-standard-5.6.12-linux-i686.tar.gz.asc | shell> gpg --verify mysql-standard-5.6.13-linux-i686.tar.gz.asc | |||
gpg: Signature made Wed 23 Jan 2013 02:25:45 AM PST using DSA key ID | gpg: Signature made Wed 23 Jan 2013 02:25:45 AM PST using DSA key ID | |||
5072E1F5 | 5072E1F5 | |||
gpg: checking the trustdb | gpg: checking the trustdb | |||
gpg: no ultimately trusted keys found | gpg: no ultimately trusted keys found | |||
gpg: Good signature from "MySQL Release Engineering <mysql-build@oss. | gpg: Good signature from "MySQL Release Engineering <mysql-build@oss. | |||
oracle.com>" | oracle.com>" | |||
gpg: WARNING: This key is not certified with a trusted signature! | gpg: WARNING: This key is not certified with a trusted signature! | |||
gpg: There is no indication that the signature belongs to th | gpg: There is no indication that the signature belongs to th | |||
e owner. | e owner. | |||
Primary key fingerprint: A4A9 4068 76FC BD3C 4567 70C8 8C71 8D3B 507 | Primary key fingerprint: A4A9 4068 76FC BD3C 4567 70C8 8C71 8D3B 507 | |||
skipping to change at line 728 | skipping to change at line 730 | |||
Next, verify the downloaded MySQL package file. This requires | Next, verify the downloaded MySQL package file. This requires | |||
files for both the packaged file, and the signature. The signature | files for both the packaged file, and the signature. The signature | |||
file must have the same name as the packaged file but with an | file must have the same name as the packaged file but with an | |||
appended .asc extension, as shown by the example in the following | appended .asc extension, as shown by the example in the following | |||
table. The signature is linked to on the downloads page for each | table. The signature is linked to on the downloads page for each | |||
MySQL product. You must create the .asc file with this signature. | MySQL product. You must create the .asc file with this signature. | |||
Table 2.2. MySQL Package and Signature Files for MySQL Installer | Table 2.2. MySQL Package and Signature Files for MySQL Installer | |||
for Microsoft Windows | for Microsoft Windows | |||
File Type File Name | File Type File Name | |||
Distribution file mysql-installer-community-5.6.12.msi | Distribution file mysql-installer-community-5.6.13.msi | |||
Signature file mysql-installer-community-5.6.12.msi.asc | Signature file mysql-installer-community-5.6.13.msi.asc | |||
Make sure that both files are stored in the same directory and | Make sure that both files are stored in the same directory and | |||
then run the following command to verify the signature for the | then run the following command to verify the signature for the | |||
distribution file. Either drag and drop the signature (.asc) file | distribution file. Either drag and drop the signature (.asc) file | |||
into Kleopatra, or load the dialog from File, Decrypt/Verify | into Kleopatra, or load the dialog from File, Decrypt/Verify | |||
Files..., and then choose either the .msi or .asc file. | Files..., and then choose either the .msi or .asc file. | |||
Figure 2.4. The Decrypt/Verify Files dialog | Figure 2.4. The Decrypt/Verify Files dialog | |||
The Decrypt/Verify Files dialog | The Decrypt/Verify Files dialog | |||
skipping to change at line 765 | skipping to change at line 767 | |||
explains why you probably don't see a green Good signature result. | explains why you probably don't see a green Good signature result. | |||
2.1.4.4. Signature Checking Using RPM | 2.1.4.4. Signature Checking Using RPM | |||
For RPM packages, there is no separate signature. RPM packages | For RPM packages, there is no separate signature. RPM packages | |||
have a built-in GPG signature and MD5 checksum. You can verify a | have a built-in GPG signature and MD5 checksum. You can verify a | |||
package by running the following command: | package by running the following command: | |||
shell> rpm --checksig package_name.rpm | shell> rpm --checksig package_name.rpm | |||
Example: | Example: | |||
shell> rpm --checksig MySQL-server-5.6.12-0.glibc23.i386.rpm | shell> rpm --checksig MySQL-server-5.6.13-0.glibc23.i386.rpm | |||
MySQL-server-5.6.12-0.glibc23.i386.rpm: md5 gpg OK | MySQL-server-5.6.13-0.glibc23.i386.rpm: md5 gpg OK | |||
Note | Note | |||
If you are using RPM 4.1 and it complains about (GPG) NOT OK | If you are using RPM 4.1 and it complains about (GPG) NOT OK | |||
(MISSING KEYS: GPG#5072e1f5), even though you have imported the | (MISSING KEYS: GPG#5072e1f5), even though you have imported the | |||
MySQL public build key into your own GPG keyring, you need to | MySQL public build key into your own GPG keyring, you need to | |||
import the key into the RPM keyring first. RPM 4.1 no longer uses | import the key into the RPM keyring first. RPM 4.1 no longer uses | |||
your personal GPG keyring (or GPG itself). Rather, RPM maintains a | your personal GPG keyring (or GPG itself). Rather, RPM maintains a | |||
separate keyring because it is a system-wide application and a | separate keyring because it is a system-wide application and a | |||
user's GPG public keyring is a user-specific file. To import the | user's GPG public keyring is a user-specific file. To import the | |||
skipping to change at line 809 | skipping to change at line 811 | |||
layouts. | layouts. | |||
* Section 2.3.1, "MySQL Installation Layout on Microsoft | * Section 2.3.1, "MySQL Installation Layout on Microsoft | |||
Windows" | Windows" | |||
* Section 2.9.1, "MySQL Layout for Source Installation" | * Section 2.9.1, "MySQL Layout for Source Installation" | |||
* Section 2.2, "MySQL Installation Layout for Generic Unix/Linux | * Section 2.2, "MySQL Installation Layout for Generic Unix/Linux | |||
Binary Package" | Binary Package" | |||
* Section 2.5.1, "MySQL Installation Layout for Linux RPM" | * Section 2.5.1, "MySQL Installation Layout for Linux RPM | |||
Packages" | ||||
* Section 2.4.2, "MySQL Installation Layout on Mac OS X" | * Section 2.4.2, "MySQL Installation Layout on Mac OS X" | |||
2.1.6. Compiler-Specific Build Characteristics | 2.1.6. Compiler-Specific Build Characteristics | |||
In some cases, the compiler used to build MySQL affects the | In some cases, the compiler used to build MySQL affects the | |||
features available for use. The notes in this section apply for | features available for use. The notes in this section apply for | |||
binary distributions provided by Oracle Corporation or that you | binary distributions provided by Oracle Corporation or that you | |||
compile yourself from source. | compile yourself from source. | |||
icc (Intel C++ Compiler) Builds | icc (Intel C++ Compiler) Builds | |||
A server built with icc has these characteristics: | A server built with icc has these characteristics: | |||
* SSL support is not included. | * SSL support is not included. | |||
2.2. Installing MySQL from Generic Binaries on Unix/Linux | 2.2. Installing MySQL on Unix/Linux Using Generic Binaries | |||
Oracle provides a set of binary distributions of MySQL. These | Oracle provides a set of binary distributions of MySQL. These | |||
include binary distributions in the form of compressed tar files | include binary distributions in the form of compressed tar files | |||
(files with a .tar.gz extension) for a number of platforms, as | (files with a .tar.gz extension) for a number of platforms, as | |||
well as binaries in platform-specific package formats for selected | well as binaries in platform-specific package formats for selected | |||
platforms. | platforms. | |||
This section covers the installation of MySQL from a compressed | This section covers the installation of MySQL from a compressed | |||
tar file binary distribution. For other platform-specific package | tar file binary distribution. For other platform-specific package | |||
formats, see the other platform-specific sections. For example, | formats, see the other platform-specific sections. For example, | |||
for Windows distributions, see Section 2.3, "Installing MySQL on | for Windows distributions, see Section 2.3, "Installing MySQL on | |||
Microsoft Windows." | Microsoft Windows." | |||
To obtain MySQL, see Section 2.1.3, "How to Get MySQL." | To obtain MySQL, see Section 2.1.3, "How to Get MySQL." | |||
MySQL compressed tar file binary distributions have names of the | MySQL compressed tar file binary distributions have names of the | |||
form mysql-VERSION-OS.tar.gz, where VERSION is a number (for | form mysql-VERSION-OS.tar.gz, where VERSION is a number (for | |||
example, 5.6.12), and OS indicates the type of operating system | example, 5.6.13), and OS indicates the type of operating system | |||
for which the distribution is intended (for example, pc-linux-i686 | for which the distribution is intended (for example, pc-linux-i686 | |||
or winx64). | or winx64). | |||
To install MySQL from a compressed tar file binary distribution, | To install MySQL from a compressed tar file binary distribution, | |||
your system must have GNU gunzip to uncompress the distribution | your system must have GNU gunzip to uncompress the distribution | |||
and a reasonable tar to unpack it. If your tar program supports | and a reasonable tar to unpack it. If your tar program supports | |||
the z option, it can both uncompress and unpack the file. | the z option, it can both uncompress and unpack the file. | |||
GNU tar is known to work. The standard tar provided with some | 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 | operating systems is not able to unpack the long file names in the | |||
skipping to change at line 1029 | skipping to change at line 1032 | |||
For a list of limitations within the Windows version of MySQL, see | For a list of limitations within the Windows version of MySQL, see | |||
Section E.10.6, "Windows Platform Limitations." | Section E.10.6, "Windows Platform Limitations." | |||
In addition to the MySQL Server package, you may need or want | In addition to the MySQL Server package, you may need or want | |||
additional components to use MySQL with your application or | additional components to use MySQL with your application or | |||
development environment. These include, but are not limited to: | development environment. These include, but are not limited to: | |||
* If you plan to connect to the MySQL server using ODBC, you | * If you plan to connect to the MySQL server using ODBC, you | |||
need a Connector/ODBC driver. For more information, including | need a Connector/ODBC driver. For more information, including | |||
installation and configuration instructions, see Section 21.1, | installation and configuration instructions, see Section 22.1, | |||
"MySQL Connector/ODBC." But note that MySQL Installer will | "MySQL Connector/ODBC." But note that MySQL Installer will | |||
install and configure Connector/ODBC for you. | install and configure Connector/ODBC for you. | |||
* If you plan to use MySQL server with .NET applications, you | * If you plan to use MySQL server with .NET applications, you | |||
need the Connector/Net driver. For more information, including | need the Connector/Net driver. For more information, including | |||
installation and configuration instructions, see Section 21.2, | installation and configuration instructions, see Section 22.2, | |||
"MySQL Connector/Net." But note that MySQL Installer will | "MySQL Connector/Net." But note that MySQL Installer will | |||
install and configure Connector/NET for you. | install and configure Connector/NET for you. | |||
MySQL distributions for Windows can be downloaded from | MySQL distributions for Windows can be downloaded from | |||
http://dev.mysql.com/downloads/. See Section 2.1.3, "How to Get | http://dev.mysql.com/downloads/. See Section 2.1.3, "How to Get | |||
MySQL." | MySQL." | |||
MySQL for Windows is available in several distribution formats, | MySQL for Windows is available in several distribution formats, | |||
detailed below. Generally speaking, you should use MySQL | detailed below. Generally speaking, you should use MySQL | |||
Installer. It is simpler to use than the ZIP file, and you need no | Installer. It is simpler to use than the ZIP file, and you need no | |||
skipping to change at line 1081 | skipping to change at line 1084 | |||
compiler system. | compiler system. | |||
For instructions on building MySQL from source on Windows, see | For instructions on building MySQL from source on Windows, see | |||
Section 2.9, "Installing MySQL from Source." | Section 2.9, "Installing MySQL from Source." | |||
MySQL on Windows considerations: | MySQL on Windows considerations: | |||
* Large Table Support | * Large Table Support | |||
If you need tables with a size larger than 4GB, install MySQL | If you need tables with a size larger than 4GB, install MySQL | |||
on an NTFS or newer file system. Do not forget to use MAX_ROWS | on an NTFS or newer file system. Do not forget to use MAX_ROWS | |||
and AVG_ROW_LENGTH when you create tables. See Section | and AVG_ROW_LENGTH when you create tables. See Section | |||
13.1.14, "CREATE TABLE Syntax." | 13.1.17, "CREATE TABLE Syntax." | |||
* MySQL and Virus Checking Software | * MySQL and Virus Checking Software | |||
Using virus scanning software such as Norton/Symantec | Using virus scanning software such as Norton/Symantec | |||
Anti-Virus on directories containing MySQL data and temporary | Anti-Virus on directories containing MySQL data and temporary | |||
tables can cause issues, both in terms of the performance of | tables can cause issues, both in terms of the performance of | |||
MySQL and the virus-scanning software mis-identifying the | MySQL and the virus-scanning software mis-identifying the | |||
contents of the files as containing spam. This is because of | contents of the files as containing spam. This is because of | |||
the fingerprinting mechanism used by the virus scanning | the fingerprinting mechanism used by the virus scanning | |||
software, and the way in which MySQL rapidly updates different | software, and the way in which MySQL rapidly updates different | |||
files, which may be identified as a potential security risk. | files, which may be identified as a potential security risk. | |||
skipping to change at line 1117 | skipping to change at line 1120 | |||
For MySQL 5.6 on Windows, the default installation directory is | For MySQL 5.6 on Windows, the default installation directory is | |||
C:\Program Files\MySQL\MySQL Server 5.6. Some Windows users prefer | C:\Program Files\MySQL\MySQL Server 5.6. Some Windows users prefer | |||
to install in C:\mysql, the directory that formerly was used as | to install in C:\mysql, the directory that formerly was used as | |||
the default. However, the layout of the subdirectories remains the | the default. However, the layout of the subdirectories remains the | |||
same. | same. | |||
All of the files are located within this parent directory, using | All of the files are located within this parent directory, using | |||
the structure shown in the following table. | the structure shown in the following table. | |||
Table 2.4. MySQL Installation Layout for Windows | Table 2.4. Default MySQL Installation Layout for Microsoft Windows | |||
Directory Contents of Directory | Directory Contents of Directory Notes | |||
bin Client programs and the mysqld server | bin Client programs and the mysqld server | |||
C:\Documents and Settings\All Users\Application Data\MySQL Log | %ALLUSERSPROFILE%\MySQL\MySQL Server 5.6\ Log files, databases | |||
files, databases (Windows XP, Windows Server 2003) | (Windows XP, Windows Server 2003) The Windows system variable | |||
C:\ProgramData\MySQL Log files, databases (Windows 7, Windows | %ALLUSERSPROFILE% defaults to C:\Documents and Settings\All | |||
Server 2008) | Users\Application Data | |||
%PROGRAMDATA%\MySQL\MySQL Server 5.6\ Log files, databases (Vista, | ||||
Windows 7, Windows Server 2008, and newer) The Windows system | ||||
variable %PROGRAMDATA% defaults to C:\ProgramData | ||||
examples Example programs and scripts | examples Example programs and scripts | |||
include Include (header) files | include Include (header) files | |||
lib Libraries | lib Libraries | |||
scripts Utility scripts | scripts Utility scripts | |||
share Miscellaneous support files, including error messages, | share Miscellaneous support files, including error messages, | |||
character set files, sample configuration files, SQL for database | character set files, sample configuration files, SQL for database | |||
installation | installation | |||
If you install MySQL using the MySQL Installer, this package | If you install MySQL using the MySQL Installer, this package | |||
creates and sets up the data directory that the installed server | creates and sets up the data directory that the installed server | |||
will use, but also creates a pristine "template" data directory | will use, and also creates a pristine "template" data directory | |||
named data under the installation directory. After an installation | named data under the installation directory. After an installation | |||
has been performed using this package, the template data directory | has been performed using this package, the template data directory | |||
can be copied to set up additional MySQL instances. See Section | can be copied to set up additional MySQL instances. See Section | |||
5.6, "Running Multiple MySQL Instances on One Machine." | 5.6, "Running Multiple MySQL Instances on One Machine." | |||
2.3.2. Choosing An Installation Package | 2.3.2. Choosing An Installation Package | |||
For MySQL 5.6, there are installation package formats to choose | For MySQL 5.6, there are installation package formats to choose | |||
from when installing MySQL on Windows: | from when installing MySQL on Windows: | |||
* MySQL Installer: This package has a file name similar to | * MySQL Installer: This package has a file name similar to | |||
mysql-installer-community-5.6.12.0.msi or | mysql-installer-community-5.6.13.0.msi or | |||
mysql-installer-commercial-5.6.12.0.msi, and utilizes MSI's to | mysql-installer-commercial-5.6.13.0.msi, and utilizes MSI's to | |||
automatically install MySQL server and other products. It will | automatically install MySQL server and other products. It will | |||
download and apply updates to itself, and for each of the | download and apply updates to itself, and for each of the | |||
installed products. It also configures the additional | installed products. It also configures the additional | |||
non-server products. | non-server products. | |||
The installed products are configurable, and this includes: | The installed products are configurable, and this includes: | |||
documentation with samples and examples, connectors (such as | documentation with samples and examples, connectors (such as | |||
C, C++, J, NET, and ODBC), MySQL Workbench, MySQL Notifier for | C, C++, J, NET, and ODBC), MySQL Workbench, MySQL Notifier for | |||
Microsoft Windows, MySQL for Excel, and the MySQL Server with | Microsoft Windows, MySQL for Excel, and the MySQL Server with | |||
its components. | its components. | |||
MySQL Installer will run on all Windows platforms that are | MySQL Installer will run on all Windows platforms that are | |||
supported by MySQL | supported by MySQL | |||
(http://www.mysql.com/support/supportedplatforms/database.html | (http://www.mysql.com/support/supportedplatforms/database.html | |||
). Note: because MySQL is not a native component of Windows | ). Note: because MySQL is not a native component of Windows | |||
and depends on .NET, it will not work on minimal installation | and depends on .NET, it will not work on minimal installation | |||
options like the "Server Core" version of Windows Server 2008. | options like the "Server Core" version of Windows Server 2008. | |||
For instructions on installing MySQL using MySQL Installer, | For instructions on installing MySQL using MySQL Installer, | |||
see Section 2.3.3, "Installing MySQL on Microsoft Windows | see Section 2.3.3, "Installing MySQL on Microsoft Windows | |||
Using MySQL Installer." | Using MySQL Installer." | |||
* The Noinstall Archive: This package has a file name similar to | * The Noinstall Archive: This package has a file name similar to | |||
mysql-5.6.12-win32.zip or mysql-5.6.12-winx64.zip, and | mysql-5.6.13-win32.zip or mysql-5.6.13-winx64.zip, and | |||
contains all the files found in the Complete install package, | contains all the files found in the Complete install package, | |||
with the exception of the GUI. This package does not include | with the exception of the GUI. This package does not include | |||
an automated installer, and must be manually installed and | an automated installer, and must be manually installed and | |||
configured. | configured. | |||
Your choice of install package affects the installation process | Your choice of install package affects the installation process | |||
you must follow. If you choose to use MySQL Installer, see Section | you must follow. If you choose to use MySQL Installer, see Section | |||
2.3.3, "Installing MySQL on Microsoft Windows Using MySQL | 2.3.3, "Installing MySQL on Microsoft Windows Using MySQL | |||
Installer." If you choose to install a Noinstall archive, see | Installer." If you choose to install a Noinstall archive, see | |||
Section 2.3.4, "Installing MySQL on Microsoft Windows Using a | Section 2.3.4, "Installing MySQL on Microsoft Windows Using a | |||
skipping to change at line 1193 | skipping to change at line 1199 | |||
MySQL Installer is an application that simplifies the installation | MySQL Installer is an application that simplifies the installation | |||
and updating process for a wide range of MySQL products, including | and updating process for a wide range of MySQL products, including | |||
MySQL Notifier for Microsoft Windows, MySQL Workbench, and MySQL | MySQL Notifier for Microsoft Windows, MySQL Workbench, and MySQL | |||
for Excel. From this central application, you can see which MySQL | for Excel. From this central application, you can see which MySQL | |||
products are already installed, configure them, and update or | products are already installed, configure them, and update or | |||
remove them if necessary. The installer can also install plugins, | remove them if necessary. The installer can also install plugins, | |||
documentation, tutorials, and example databases. The MySQL | documentation, tutorials, and example databases. The MySQL | |||
Installer is only available for Microsoft Windows, and includes | Installer is only available for Microsoft Windows, and includes | |||
both a GUI and command-line interface. | both a GUI and command-line interface. | |||
Community edition | Installer package types | |||
Download the community edition of MySQL Installer at | * Full: Bundles all of the MySQL products (including MySQL | |||
http://dev.mysql.com/downloads/installer/. It will install the | Server). The file is over 160MB, and have names of the form | |||
community version of all MySQL products. | mysql-installer-community-VERSION.N.msi where VERSION is the | |||
MySQL Server version number such as 5.6 and N is the package | ||||
Commercial edition | number, which begins at 0. | |||
Download the commercial edition of MySQL Installer at either My | * Web: Only contains the Installer and configuration files, and | |||
Oracle Support (https://support.oracle.com/) (MOS) or | it only downloads the MySQL products you choose to install. | |||
https://edelivery.oracle.com/. It will install the commercial | The file is about 2MB, and have names of the form | |||
version of all MySQL products, including Workbench SE. It also | mysql-installer-community-web-VERSION.N.msi where VERSION is | |||
integrates with your MOS account, so enter in your MOS credentials | the MySQL Server version number such as 5.6 and N is the | |||
to automatically receive updates for your commercial MySQL | package number, which begins at 0. | |||
products. | ||||
Installer editions | ||||
* Community edition: Downloadable at | ||||
http://dev.mysql.com/downloads/installer/. It installs the | ||||
community edition of all MySQL products. | ||||
* Commercial edition: Downloadable at either My Oracle Support | ||||
(https://support.oracle.com/) (MOS) or | ||||
https://edelivery.oracle.com/. It installs the commercial | ||||
version of all MySQL products, including Workbench SE. It also | ||||
integrates with your MOS account, so enter in your MOS | ||||
credentials to automatically receive updates for your | ||||
commercial MySQL products. | ||||
For release notes detailing the changes in each release of MySQL | For release notes detailing the changes in each release of MySQL | |||
Installer, see MySQL Installer Release Notes | Installer, see MySQL Installer Release Notes | |||
(http://dev.mysql.com/doc/relnotes/mysql-installer/en/). | (http://dev.mysql.com/doc/relnotes/mysql-installer/en/). | |||
MySQL Installer is compatible with pre-existing installations, and | MySQL Installer is compatible with pre-existing installations, and | |||
adds them to its list of installed components. And while the MySQL | adds them to its list of installed components. And while the MySQL | |||
Installer is bundled with a specific version of MySQL Server, a | Installer is bundled with a specific version of MySQL Server, a | |||
single MySQL Installer instance can install and manage multiple | single MySQL Installer instance can install and manage multiple | |||
MySQL Server versions. For example, a single MySQL Installer | MySQL Server versions. For example, a single MySQL Installer | |||
skipping to change at line 1517 | skipping to change at line 1536 | |||
password=password or | password=password or | |||
--user=product_name:name=username,host:hostname,role=rolename, | --user=product_name:name=username,host:hostname,role=rolename, | |||
tokens=tokens | tokens=tokens | |||
Creates a new user. | Creates a new user. | |||
Requires: name, host, role, and the password or tokens. Tokens | Requires: name, host, role, and the password or tokens. Tokens | |||
are separated by pipe ("|") characters. | are separated by pipe ("|") characters. | |||
2.3.4. Installing MySQL on Microsoft Windows Using a noinstall Zip | 2.3.4. Installing MySQL on Microsoft Windows Using a noinstall Zip | |||
Archive | Archive | |||
Users who are installing from the Noinstall package can use the | Users who are installing from the noinstall package can use the | |||
instructions in this section to manually install MySQL. The | instructions in this section to manually install MySQL. The | |||
process for installing MySQL from a Zip archive is as follows: | process for installing MySQL from a Zip archive is as follows: | |||
1. Extract the archive to the desired install directory | 1. Extract the archive to the desired install directory | |||
2. Create an option file | 2. Create an option file | |||
3. Choose a MySQL server type | 3. Choose a MySQL server type | |||
4. Start the MySQL server | 4. Start the MySQL server | |||
skipping to change at line 1738 | skipping to change at line 1757 | |||
InnoDB: Doublewrite buffer not found: creating new | InnoDB: Doublewrite buffer not found: creating new | |||
InnoDB: Doublewrite buffer created | InnoDB: Doublewrite buffer created | |||
InnoDB: creating foreign key constraint system tables | InnoDB: creating foreign key constraint system tables | |||
InnoDB: foreign key constraint system tables created | InnoDB: foreign key constraint system tables created | |||
011024 10:58:25 InnoDB: Started | 011024 10:58:25 InnoDB: Started | |||
When the server finishes its startup sequence, you should see | When the server finishes its startup sequence, you should see | |||
something like this, which indicates that the server is ready to | something like this, which indicates that the server is ready to | |||
service client connections: | service client connections: | |||
mysqld: ready for connections | mysqld: ready for connections | |||
Version: '5.6.12' socket: '' port: 3306 | Version: '5.6.13' socket: '' port: 3306 | |||
The server continues to write to the console any further | The server continues to write to the console any further | |||
diagnostic output it produces. You can open a new console window | diagnostic output it produces. You can open a new console window | |||
in which to run client programs. | in which to run client programs. | |||
If you omit the --console option, the server writes diagnostic | If you omit the --console option, the server writes diagnostic | |||
output to the error log in the data directory (C:\Program | output to the error log in the data directory (C:\Program | |||
Files\MySQL\MySQL Server 5.6\data by default). The error log is | Files\MySQL\MySQL Server 5.6\data by default). The error log is | |||
the file with the .err extension, and may be set using the | the file with the .err extension, and may be set using the | |||
--log-error option. | --log-error option. | |||
skipping to change at line 2501 | skipping to change at line 2520 | |||
architectures. There is no Universal Binary available using | architectures. There is no Universal Binary available using | |||
the package installation method. The user you use to perform | the package installation method. The user you use to perform | |||
the installation must have administrator privileges. | the installation must have administrator privileges. | |||
* Tar package format, which uses a file packaged using the Unix | * Tar package format, which uses a file packaged using the Unix | |||
tar and gzip commands. To use this method, you will need to | tar and gzip commands. To use this method, you will need to | |||
open a Terminal window. You do not need administrator | open a Terminal window. You do not need administrator | |||
privileges using this method, as you can install the MySQL | privileges using this method, as you can install the MySQL | |||
server anywhere using this method. For more information on | server anywhere using this method. For more information on | |||
using this method, you can use the generic instructions for | using this method, you can use the generic instructions for | |||
using a tarball, Section 2.2, "Installing MySQL from Generic | using a tarball, Section 2.2, "Installing MySQL on Unix/Linux | |||
Binaries on Unix/Linux."You can use the package installer with | Using Generic Binaries."You can use the package installer with | |||
Mac OS X 10.3 and later, and available for both PowerPC and | Mac OS X 10.3 and later, and available for both PowerPC and | |||
Intel architectures, and both 32-bit and 64-bit architectures. | Intel architectures, and both 32-bit and 64-bit architectures. | |||
A Universal Binary, incorporating both Power PC and Intel | A Universal Binary, incorporating both Power PC and Intel | |||
architectures and 32-bit and 64-bit binaries is available. | architectures and 32-bit and 64-bit binaries is available. | |||
In addition to the core installation, the Package Installer | In addition to the core installation, the Package Installer | |||
also includes Section 2.4.3, "Installing the MySQL Startup | also includes Section 2.4.3, "Installing the MySQL Startup | |||
Item" and Section 2.4.4, "Installing and Using the MySQL | Item" and Section 2.4.4, "Installing and Using the MySQL | |||
Preference Pane," both of which simplify the management of | Preference Pane," both of which simplify the management of | |||
your installation. | your installation. | |||
skipping to change at line 2613 | skipping to change at line 2632 | |||
* After you have copied over the MySQL database files from the | * After you have copied over the MySQL database files from the | |||
previous installation and have successfully started the new | previous installation and have successfully started the new | |||
server, you should consider removing the old installation | server, you should consider removing the old installation | |||
files to save disk space. Additionally, you should also remove | files to save disk space. Additionally, you should also remove | |||
older versions of the Package Receipt directories located in | older versions of the Package Receipt directories located in | |||
/Library/Receipts/mysql-VERSION.pkg. | /Library/Receipts/mysql-VERSION.pkg. | |||
2.4.2. Installing MySQL on Mac OS X Using Native Packages | 2.4.2. Installing MySQL on Mac OS X Using Native Packages | |||
You can install MySQL on Mac OS X 10.3.x ("Panther") or newer | You can install MySQL on Mac OS X 10.3.x ("Panther") or newer | |||
using a Mac OS X binary package in PKG format instead of the | using a Mac OS X binary package in DMG format instead of the | |||
binary tarball distribution. Please note that older versions of | binary tarball distribution. Please note that older versions of | |||
Mac OS X (for example, 10.1.x or 10.2.x) are not supported by this | Mac OS X (for example, 10.1.x or 10.2.x) are not supported by this | |||
package. | package. | |||
The package is located inside a disk image (.dmg) file that you | The package is located inside a disk image (.dmg) file that you | |||
first need to mount by double-clicking its icon in the Finder. It | first need to mount by double-clicking its icon in the Finder. It | |||
should then mount the image and display its contents. | should then mount the image and display its contents. | |||
Note | Note | |||
Before proceeding with the installation, be sure to stop all | Before proceeding with the installation, be sure to stop all | |||
skipping to change at line 2889 | skipping to change at line 2908 | |||
PHP. For more information on obtaining and installing MySQL | PHP. For more information on obtaining and installing MySQL | |||
libraries, see Mac OS X Server version 10.5: MySQL libraries | libraries, see Mac OS X Server version 10.5: MySQL libraries | |||
available for download (http://support.apple.com/kb/TA25017). | available for download (http://support.apple.com/kb/TA25017). | |||
Alternatively, you can ignore the bundled MySQL server and | Alternatively, you can ignore the bundled MySQL server and | |||
install MySQL from the package or tarball installation. | install MySQL from the package or tarball installation. | |||
2.5. Installing MySQL on Linux | 2.5. Installing MySQL on Linux | |||
Linux supports a number of different solutions for installing | Linux supports a number of different solutions for installing | |||
MySQL. The recommended method is to use one of the distributions | MySQL. The recommended method is to use one of the distributions | |||
from Oracle. If you choose this method, there are three options | from Oracle. If you choose this method, there are several options | |||
available: | available: | |||
* Installing from a generic binary package in .tar.gz format. | * Installing from a generic binary package in .tar.gz format. | |||
See Section 2.2, "Installing MySQL from Generic Binaries on | See Section 2.2, "Installing MySQL on Unix/Linux Using Generic | |||
Unix/Linux" for more information. | Binaries" for more information. | |||
* Extracting and compiling MySQL from a source distribution. For | * Extracting and compiling MySQL from a source distribution. For | |||
detailed instructions, see Section 2.9, "Installing MySQL from | detailed instructions, see Section 2.9, "Installing MySQL from | |||
Source." | Source." | |||
* Installing using a pre-compiled RPM package. For more | * Installing using a precompiled RPM package. For more | |||
information on using the RPM solution, see Section 2.5.1, | information, see Section 2.5.1, "Installing MySQL on Linux | |||
"Installing MySQL from RPM Packages on Linux." | Using RPM Packages." | |||
* Installing using a precompiled Debian package. For more | ||||
information, see Section 2.5.2, "Installing MySQL on Linux | ||||
Using Debian Packages." | ||||
As an alternative, you can use the native package manager within | As an alternative, you can use the native package manager within | |||
your Linux distribution to automatically download and install | your Linux distribution to automatically download and install | |||
MySQL for you. Native package installations can take of the | MySQL for you. Native package installations can take of the | |||
download and dependencies required to run MySQL, but the MySQL | download and dependencies required to run MySQL, but the MySQL | |||
version will often be some way behind the currently available | version will often be some versions behind the currently available | |||
release. You will also normally be unable to install developmental | release. You will also normally be unable to install development | |||
releases, as these are not usually made available in the native | releases, as these are not usually made available in the native | |||
repository. For more information on using the native package | repository. For more information on using the native package | |||
installers, see Section 2.5.2, "Installing MySQL on Linux using | installers, see Section 2.5.3, "Installing MySQL on Linux Using | |||
Native Package Manager." | Native Package Managers." | |||
Note | Note | |||
For many Linux installations, you will want to set up MySQL to be | For many Linux installations, you will want to set up MySQL to be | |||
started automatically when your machine starts. Many of the native | started automatically when your machine starts. Many of the native | |||
package installations perform this operation for you, but for | package installations perform this operation for you, but for | |||
source, binary and RPM solutions you may need to set this up | source, binary and RPM solutions you may need to set this up | |||
separately. The required script, mysql.server, can be found in the | separately. The required script, mysql.server, can be found in the | |||
support-files directory under the MySQL installation directory or | support-files directory under the MySQL installation directory or | |||
in a MySQL source tree. You can install it as /etc/init.d/mysql | in a MySQL source tree. You can install it as /etc/init.d/mysql | |||
for automatic MySQL startup and shutdown. See Section 2.10.1.2, | for automatic MySQL startup and shutdown. See Section 2.10.1.2, | |||
"Starting and Stopping MySQL Automatically." | "Starting and Stopping MySQL Automatically." | |||
2.5.1. Installing MySQL from RPM Packages on Linux | 2.5.1. Installing MySQL on Linux Using RPM Packages | |||
Note | Note | |||
To install or upgrade to MySQL 5.6.11, be sure to read the special | To install or upgrade to MySQL 5.6.11, be sure to read the special | |||
instructions at the end of this section. | instructions at the end of this section. | |||
The recommended way to install MySQL on RPM-based Linux | The recommended way to install MySQL on RPM-based Linux | |||
distributions is by using the RPM packages. The RPMs that we | distributions is by using the RPM packages. The RPMs that we | |||
provide to the community should work on all versions of Linux that | provide to the community should work on all versions of Linux that | |||
support RPM packages and use glibc 2.3. To obtain RPM packages, | support RPM packages and use glibc 2.3. To obtain RPM packages, | |||
see Section 2.1.3, "How to Get MySQL." | see Section 2.1.3, "How to Get MySQL." | |||
For non-RPM Linux distributions, you can install MySQL using a | For non-RPM Linux distributions, you can install MySQL using a | |||
.tar.gz package. See Section 2.2, "Installing MySQL from Generic | .tar.gz package. See Section 2.2, "Installing MySQL on Unix/Linux | |||
Binaries on Unix/Linux." | Using Generic Binaries." | |||
Installations created from our Linux RPM distributions result in | Installations created from our Linux RPM distributions result in | |||
files under the following system directories. | files under the system directories shown in the following table. | |||
Table 2.9. MySQL Installation Layout for Linux RPM | Table 2.9. MySQL Installation Layout for Linux RPM Packages | |||
Directory Contents of Directory | Directory Contents of Directory | |||
/usr/bin Client programs and scripts | /usr/bin Client programs and scripts | |||
/usr/sbin The mysqld server | /usr/sbin The mysqld server | |||
/var/lib/mysql Log files, databases | /var/lib/mysql Log files, databases | |||
/usr/share/info Manual in Info format | /usr/share/info Manual in Info format | |||
/usr/share/man Unix manual pages | /usr/share/man Unix manual pages | |||
/usr/include/mysql Include (header) files | /usr/include/mysql Include (header) files | |||
/usr/lib/mysql Libraries | /usr/lib/mysql Libraries | |||
/usr/share/mysql Miscellaneous support files, including error | /usr/share/mysql Miscellaneous support files, including error | |||
messages, character set files, sample configuration files, SQL for | messages, character set files, sample configuration files, SQL for | |||
skipping to change at line 2994 | skipping to change at line 3017 | |||
this is done, root cannot do anything else. This must be done for | this is done, root cannot do anything else. This must be done for | |||
each root account you intend to use. To change the password, you | each root account you intend to use. To change the password, you | |||
can use the SET PASSWORD statement (for example, with the mysql | can use the SET PASSWORD statement (for example, with the mysql | |||
client). You can also use mysqladmin or mysql_secure_installation. | client). You can also use mysqladmin or mysql_secure_installation. | |||
For additional details, see Section 4.4.3, "mysql_install_db --- | For additional details, see Section 4.4.3, "mysql_install_db --- | |||
Initialize MySQL Data Directory." (Install operations using RPMs | Initialize MySQL Data Directory." (Install operations using RPMs | |||
for Unbreakable Linux Network are unaffected because they do not | for Unbreakable Linux Network are unaffected because they do not | |||
use mysql_install_db.) | use mysql_install_db.) | |||
RPMs for MySQL Cluster. Standard MySQL server RPMs built by MySQL | RPMs for MySQL Cluster. Standard MySQL server RPMs built by MySQL | |||
do not provide support for the NDBCLUSTER | do not provide support for the NDBCLUSTER storage engine. | |||
(http://dev.mysql.com/doc/refman/5.5/en/mysql-cluster.html) | ||||
storage engine. | ||||
Important | Important | |||
When upgrading a MySQL Cluster RPM installation, you must upgrade | When upgrading a MySQL Cluster RPM installation, you must upgrade | |||
all installed RPMs, including the Server and Client RPMs. | all installed RPMs, including the Server and Client RPMs. | |||
For more information about installing MySQL Cluster from RPMs, see | For more information about installing MySQL Cluster from RPMs, see | |||
MySQL Cluster Installation and Upgrades | Section 17.2, "MySQL Cluster Installation." | |||
(http://dev.mysql.com/doc/refman/5.5/en/mysql-cluster-installation | ||||
.html). | ||||
For upgrades, if your installation was originally produced by | For upgrades, if your installation was originally produced by | |||
installing multiple RPM packages, it is best to upgrade all the | installing multiple RPM packages, it is best to upgrade all the | |||
packages, not just some. For example, if you previously installed | packages, not just some. For example, if you previously installed | |||
the server and client RPMs, do not upgrade just the server RPM. | the server and client RPMs, do not upgrade just the server RPM. | |||
If you get a dependency failure when trying to install MySQL | If you get a dependency failure when trying to install MySQL | |||
packages (for example, error: removing these packages would break | packages (for example, error: removing these packages would break | |||
dependencies: libmysqlclient.so.10 is needed by ...), you should | dependencies: libmysqlclient.so.10 is needed by ...), you should | |||
also install the MySQL-shared-compat package, which includes the | also install the MySQL-shared-compat package, which includes the | |||
skipping to change at line 3031 | skipping to change at line 3050 | |||
* MySQL-server-VERSION.glibc23.i386.rpm | * MySQL-server-VERSION.glibc23.i386.rpm | |||
The MySQL server. You need this unless you only want to | The MySQL server. You need this unless you only want to | |||
connect to a MySQL server running on another machine. | connect to a MySQL server running on another machine. | |||
* MySQL-client-VERSION.glibc23.i386.rpm | * MySQL-client-VERSION.glibc23.i386.rpm | |||
The standard MySQL client programs. You probably always want | The standard MySQL client programs. You probably always want | |||
to install this package. | to install this package. | |||
* MySQL-devel-VERSION.glibc23.i386.rpm | * MySQL-devel-VERSION.glibc23.i386.rpm | |||
The libraries and include files that are needed if you want to | The libraries and include files that are needed if to compile | |||
compile other MySQL clients, such as the Perl modules. | other MySQL clients, such as the Perl modules. Install this | |||
RPM if you intend to compile C API applications. | ||||
* MySQL-shared-VERSION.glibc23.i386.rpm | * MySQL-shared-VERSION.glibc23.i386.rpm | |||
This package contains the shared libraries | This package contains the shared libraries | |||
(libmysqlclient.so*) that certain languages and applications | (libmysqlclient.so*) that certain languages and applications | |||
need to dynamically load and use MySQL. It contains | need to dynamically load and use MySQL. It contains | |||
single-threaded and thread-safe libraries. | single-threaded and thread-safe libraries. Install this RPM if | |||
you intend to compile or run C API applications that depend on | ||||
the shared client library. | ||||
* MySQL-shared-compat-VERSION.glibc23.i386.rpm | * MySQL-shared-compat-VERSION.glibc23.i386.rpm | |||
This package includes the shared libraries for older releases, | This package includes the shared libraries for older releases, | |||
but not the libraries for the current release. It contains | but not the libraries for the current release. It contains | |||
single-threaded and thread-safe libraries. Install this | single-threaded and thread-safe libraries. Install this | |||
package if you have applications installed that are | package if you have applications installed that are | |||
dynamically linked against older versions of MySQL but you | dynamically linked against older versions of MySQL but you | |||
want to upgrade to the current version without breaking the | want to upgrade to the current version without breaking the | |||
library dependencies. | library dependencies. | |||
As of MySQL 5.6.5, the MySQL-shared-compat RPM package enables | As of MySQL 5.6.5, the MySQL-shared-compat RPM package enables | |||
skipping to change at line 3095 | skipping to change at line 3117 | |||
that supports glibc 2.3 | that supports glibc 2.3 | |||
rhel4, rhel5 Red Hat Enterprise Linux 4 or 5 | rhel4, rhel5 Red Hat Enterprise Linux 4 or 5 | |||
el6 Enterprise Linux 6 | el6 Enterprise Linux 6 | |||
sles10, sles11 SuSE Linux Enterprise Server 10 or 11 | sles10, sles11 SuSE Linux Enterprise Server 10 or 11 | |||
In MySQL 5.6, only glibc23 packages are available currently. | In MySQL 5.6, only glibc23 packages are available currently. | |||
The CPU value indicates the processor type or family for which the | The CPU value indicates the processor type or family for which the | |||
package is built. | package is built. | |||
Table 2.11. MySQL Installation Packages for Linux CPU Identifier | Table 2.11. MySQL Installation Packages for Linux CPU Identifiers | |||
CPU Value Intended Processor Type or Family | CPU Value Intended Processor Type or Family | |||
i386, i586, i686 Pentium processor or better, 32 bit | i386, i586, i686 Pentium processor or better, 32 bit | |||
x86_64 64-bit x86 processor | x86_64 64-bit x86 processor | |||
ia64 Itanium (IA-64) processor | ia64 Itanium (IA-64) processor | |||
To see all files in an RPM package (for example, a MySQL-server | To see all files in an RPM package (for example, a MySQL-server | |||
RPM), run a command like this: | RPM), run a command like this: | |||
shell> rpm -qpl MySQL-server-VERSION.glibc23.i386.rpm | shell> rpm -qpl MySQL-server-VERSION.glibc23.i386.rpm | |||
To perform a standard minimal installation, install the server and | To perform a standard minimal installation, install the server and | |||
client RPMs: | client RPMs: | |||
shell> rpm -i MySQL-server-VERSION.glibc23.i386.rpm | shell> rpm -i MySQL-server-VERSION.glibc23.i386.rpm | |||
shell> rpm -i MySQL-client-VERSION.glibc23.i386.rpm | shell> rpm -i MySQL-client-VERSION.glibc23.i386.rpm | |||
To install only the client programs, install just the client RPM: | To install only the client programs, install just the client RPM: | |||
shell> rpm -i MySQL-client-VERSION.glibc23.i386.rpm | shell> rpm -i MySQL-client-VERSION.glibc23.i386.rpm | |||
RPM provides a feature to verify the integrity and authenticity of | RPM provides a feature to verify the integrity and authenticity of | |||
packages before installing them. If you would like to learn more | packages before installing them. To learn more about this feature, | |||
about this feature, see Section 2.1.4, "Verifying Package | see Section 2.1.4, "Verifying Package Integrity Using MD5 | |||
Integrity Using MD5 Checksums or GnuPG." | Checksums or GnuPG." | |||
The server RPM places data under the /var/lib/mysql directory. The | The server RPM places data under the /var/lib/mysql directory. The | |||
RPM also creates a login account for a user named mysql (if one | RPM also creates a login account for a user named mysql (if one | |||
does not exist) to use for running the MySQL server, and creates | does not exist) to use for running the MySQL server, and creates | |||
the appropriate entries in /etc/init.d/ to start the server | the appropriate entries in /etc/init.d/ to start the server | |||
automatically at boot time. (This means that if you have performed | automatically at boot time. (This means that if you have performed | |||
a previous installation and have made changes to its startup | a previous installation and have made changes to its startup | |||
script, you may want to make a copy of the script so that you do | script, you may want to make a copy of the script so that you do | |||
not lose it when you install a newer RPM.) See Section 2.10.1.2, | not lose it when you install a newer RPM.) See Section 2.10.1.2, | |||
"Starting and Stopping MySQL Automatically," for more information | "Starting and Stopping MySQL Automatically," for more information | |||
skipping to change at line 3142 | skipping to change at line 3164 | |||
unattended installation is not known. | unattended installation is not known. | |||
In MySQL 5.6, during an upgrade installation using the RPM | In MySQL 5.6, during an upgrade installation using the RPM | |||
packages, if the MySQL server is running when the upgrade occurs, | packages, if the MySQL server is running when the upgrade occurs, | |||
the MySQL server is stopped, the upgrade occurs, and the MySQL | the MySQL server is stopped, the upgrade occurs, and the MySQL | |||
server is restarted. If the MySQL server is not already running | server is restarted. If the MySQL server is not already running | |||
when the RPM upgrade occurs, the MySQL server is not started at | when the RPM upgrade occurs, the MySQL server is not started at | |||
the end of the installation. | the end of the installation. | |||
If something goes wrong, you can find more information in the | If something goes wrong, you can find more information in the | |||
binary installation section. See Section 2.2, "Installing MySQL | binary installation section. See Section 2.2, "Installing MySQL on | |||
from Generic Binaries on Unix/Linux." | Unix/Linux Using Generic Binaries." | |||
Note | Note | |||
The accounts that are listed in the MySQL grant tables initially | The accounts that are listed in the MySQL grant tables initially | |||
have no passwords. After starting the server, you should set up | have no passwords. After starting the server, you should set up | |||
passwords for them using the instructions in Section 2.10, | passwords for them using the instructions in Section 2.10, | |||
"Postinstallation Setup and Testing." | "Postinstallation Setup and Testing." | |||
During RPM installation, a user named mysql and a group named | During RPM installation, a user named mysql and a group named | |||
mysql are created on the system. This is done using the useradd, | mysql are created on the system. This is done using the useradd, | |||
groupadd, and usermod commands. Those commands require appropriate | groupadd, and usermod commands. Those commands require appropriate | |||
skipping to change at line 3209 | skipping to change at line 3231 | |||
shell> rpm -e MySQL-server-OLDVERSION.glibc23.i386.rpm | shell> rpm -e MySQL-server-OLDVERSION.glibc23.i386.rpm | |||
Repeat this step for all installed MySQL RPMs. | Repeat this step for all installed MySQL RPMs. | |||
2. Install the new version. NEWVERSION is the version to install. | 2. Install the new version. NEWVERSION is the version to install. | |||
shell> rpm -ivh MySQL-server-NEWVERSION.glibc23.i386.rpm | shell> rpm -ivh MySQL-server-NEWVERSION.glibc23.i386.rpm | |||
Alternatively, the removal and installation can be done using yum: | Alternatively, the removal and installation can be done using yum: | |||
shell> yum remove MySQL-server-OLDVERSION.glibc23.i386.rpm | shell> yum remove MySQL-server-OLDVERSION.glibc23.i386.rpm | |||
shell> yum install MySQL-server-NEWVERSION.glibc23.i386.rpm | shell> yum install MySQL-server-NEWVERSION.glibc23.i386.rpm | |||
2.5.2. Installing MySQL on Linux using Native Package Manager | 2.5.2. Installing MySQL on Linux Using Debian Packages | |||
Oracle provides Debian packages for installation on Debian or | ||||
Debian-like Linux systems. To obtain a package, see Section 2.1.3, | ||||
"How to Get MySQL." | ||||
Note | ||||
Debian distributions of MySQL are also provided by other vendors. | ||||
Be aware that they may differ from those built by us in features, | ||||
capabilities, and conventions (including communication setup), and | ||||
that the instructions in this manual do not necessarily apply to | ||||
installing them. The vendor's instructions should be consulted | ||||
instead. | ||||
Debian package files have names in mysql-MVER-DVER-CPU.deb format. | ||||
MVER is the MySQL version and DVER is the Debian version. The CPU | ||||
value indicates the processor type or family for which the package | ||||
is built, as shown in the following table. | ||||
Table 2.12. MySQL Installation Packages for Linux CPU Identifiers | ||||
CPU Value Intended Processor Type or Family | ||||
i686 Pentium processor or better, 32 bit | ||||
x86_64 64-bit x86 processor | ||||
After downloading a Debian package, use the following command to | ||||
install it; | ||||
shell> dpkg -i mysql-MVER-DVER-CPU.deb | ||||
The Debian package installs files in the /opt/mysql/server-5.6 | ||||
directory. | ||||
You may also need to install the libaio library if it is not | ||||
already present on your system: | ||||
shell> apt-get install libaio1 | ||||
2.5.3. Installing MySQL on Linux Using Native Package Managers | ||||
Many Linux distributions include a version of the MySQL server, | Many Linux distributions include a version of the MySQL server, | |||
client tools, and development components into the standard package | client tools, and development components into the standard package | |||
management system built into distributions such as Fedora, Debian, | management system built into distributions such as Fedora, Debian, | |||
Ubuntu, and Gentoo. This section provides basic instructions for | Ubuntu, and Gentoo. This section provides basic instructions for | |||
installing MySQL using these systems. | installing MySQL using these systems. | |||
Important | Important | |||
Native package installations can take care of the download and | Native package installations can take care of the download and | |||
dependencies required to run MySQL, but the MySQL version will | dependencies required to run MySQL, but the MySQL version will | |||
often be some way behind the currently available release. You will | often be some way behind the currently available release. You will | |||
also normally be unable to install developmental releases, as | also normally be unable to install development releases, as these | |||
these are not usually made available in the native repository. | are not usually made available in the native repository. | |||
Distribution specific instructions are shown below: | Distribution specific instructions are shown below: | |||
* Red Hat Linux, Fedora, CentOS | * Red Hat Linux, Fedora, CentOS | |||
For Red Hat and similar distributions, the MySQL distribution | For Red Hat and similar distributions, the MySQL distribution | |||
is divided into a number of separate packages, mysql for the | is divided into a number of separate packages, mysql for the | |||
client tools, mysql-server for the server and associated | client tools, mysql-server for the server and associated | |||
tools, and mysql-libs for the libraries. The libraries are | tools, and mysql-libs for the libraries. The libraries are | |||
required if you want to provide connectivity from different | required if you want to provide connectivity from different | |||
languages and environments such as Perl, Python and others. | languages and environments such as Perl, Python and others. | |||
skipping to change at line 3480 | skipping to change at line 3537 | |||
To enable MySQL to start automatically at the normal (default) | To enable MySQL to start automatically at the normal (default) | |||
run levels, you can use: | run levels, you can use: | |||
root-shell> rc-update add mysql default | root-shell> rc-update add mysql default | |||
2.6. Installing MySQL on Solaris and OpenSolaris | 2.6. Installing MySQL on Solaris and OpenSolaris | |||
MySQL on Solaris and OpenSolaris is available in a number of | MySQL on Solaris and OpenSolaris is available in a number of | |||
different formats. | different formats. | |||
* For information on installing using the native Solaris PKG | * For information on installing using the native Solaris PKG | |||
format, see Section 2.6.1, "Installing MySQL on Solaris using | format, see Section 2.6.1, "Installing MySQL on Solaris Using | |||
a Solaris PKG." | a Solaris PKG." | |||
* On OpenSolaris, the standard package repositories include | * On OpenSolaris, the standard package repositories include | |||
MySQL packages specially built for OpenSolaris that include | MySQL packages specially built for OpenSolaris that include | |||
entries for the Service Management Framework (SMF) to enable | entries for the Service Management Framework (SMF) to enable | |||
control of the installation using the SMF administration | control of the installation using the SMF administration | |||
commands. For more information, see Section 2.6.2, "Installing | commands. For more information, see Section 2.6.2, "Installing | |||
MySQL on OpenSolaris using IPS." | MySQL on OpenSolaris Using IPS." | |||
* To use a standard tar binary installation, use the notes | * To use a standard tar binary installation, use the notes | |||
provided in Section 2.2, "Installing MySQL from Generic | provided in Section 2.2, "Installing MySQL on Unix/Linux Using | |||
Binaries on Unix/Linux." Check the notes and hints at the end | Generic Binaries." Check the notes and hints at the end of | |||
of this section for Solaris specific notes that you may need | this section for Solaris specific notes that you may need | |||
before or after installation. | before or after installation. | |||
To obtain a binary MySQL distribution for Solaris in tarball or | To obtain a binary MySQL distribution for Solaris in tarball or | |||
PKG format, http://dev.mysql.com/downloads/mysql/5.6.html. | PKG format, http://dev.mysql.com/downloads/mysql/5.6.html. | |||
Additional notes to be aware of when installing and using MySQL on | Additional notes to be aware of when installing and using MySQL on | |||
Solaris: | Solaris: | |||
* If you want to use MySQL with the mysql user and group, use | * If you want to use MySQL with the mysql user and group, use | |||
the groupadd and useradd commands: | the groupadd and useradd commands: | |||
skipping to change at line 3543 | skipping to change at line 3600 | |||
* To configure the generation of core files on Solaris you | * To configure the generation of core files on Solaris you | |||
should use the coreadm command. Because of the security | should use the coreadm command. Because of the security | |||
implications of generating a core on a setuid() application, | implications of generating a core on a setuid() application, | |||
by default, Solaris does not support core files on setuid() | by default, Solaris does not support core files on setuid() | |||
programs. However, you can modify this behavior using coreadm. | programs. However, you can modify this behavior using coreadm. | |||
If you enable setuid() core files for the current user, they | If you enable setuid() core files for the current user, they | |||
will be generated using the mode 600 and owned by the | will be generated using the mode 600 and owned by the | |||
superuser. | superuser. | |||
2.6.1. Installing MySQL on Solaris using a Solaris PKG | 2.6.1. Installing MySQL on Solaris Using a Solaris PKG | |||
You can install MySQL on Solaris and OpenSolaris using a binary | You can install MySQL on Solaris and OpenSolaris using a binary | |||
package using the native Solaris PKG format instead of the binary | package using the native Solaris PKG format instead of the binary | |||
tarball distribution. | tarball distribution. | |||
To use this package, download the corresponding | To use this package, download the corresponding | |||
mysql-VERSION-solaris10-PLATFORM.pkg.gz file, then decompress it. | mysql-VERSION-solaris10-PLATFORM.pkg.gz file, then uncompress it. | |||
For example: | For example: | |||
shell> gunzip mysql-5.6.12-solaris10-x86_64.pkg.gz | shell> gunzip mysql-5.6.13-solaris10-x86_64.pkg.gz | |||
To install a new package, use pkgadd and follow the onscreen | To install a new package, use pkgadd and follow the onscreen | |||
prompts. You must have root privileges to perform this operation: | prompts. You must have root privileges to perform this operation: | |||
shell> pkgadd -d mysql-5.6.12-solaris10-x86_64.pkg | shell> pkgadd -d mysql-5.6.13-solaris10-x86_64.pkg | |||
The following packages are available: | The following packages are available: | |||
1 mysql MySQL Community Server (GPL) | 1 mysql MySQL Community Server (GPL) | |||
(i86pc) 5.6.12 | (i86pc) 5.6.13 | |||
Select package(s) you wish to process (or 'all' to process | Select package(s) you wish to process (or 'all' to process | |||
all packages). (default: all) [?,??,q]: | all packages). (default: all) [?,??,q]: | |||
The PKG installer installs all of the files and tools needed, and | The PKG installer installs all of the files and tools needed, and | |||
then initializes your database if one does not exist. To complete | then initializes your database if one does not exist. To complete | |||
the installation, you should set the root password for MySQL as | the installation, you should set the root password for MySQL as | |||
provided in the instructions at the end of the installation. | provided in the instructions at the end of the installation. | |||
Alternatively, you can run the mysql_secure_installation script | Alternatively, you can run the mysql_secure_installation script | |||
that comes with the installation. | that comes with the installation. | |||
The default installation directory is /opt/mysql. You can only | By default, the PKG package installs MySQL under the root path | |||
change the root path of the installation when using pkgadd, which | /opt/mysql. You can change only the installation root path when | |||
can be used to install MySQL in a different Solaris zone. If you | using pkgadd, which can be used to install MySQL in a different | |||
need to install in a specific directory, use the binary tar file. | Solaris zone. If you need to install in a specific directory, use | |||
a binary tar file distribution. | ||||
The pkg installer copies a suitable startup script for MySQL into | The pkg installer copies a suitable startup script for MySQL into | |||
/etc/init.d/mysql. To enable MySQL to startup and shutdown | /etc/init.d/mysql. To enable MySQL to startup and shutdown | |||
automatically, you should create a link between this file and the | automatically, you should create a link between this file and the | |||
init script directories. For example, to ensure safe startup and | init script directories. For example, to ensure safe startup and | |||
shutdown of MySQL you could use the following commands to add the | shutdown of MySQL you could use the following commands to add the | |||
right links: | right links: | |||
shell> ln /etc/init.d/mysql /etc/rc3.d/S91mysql | shell> ln /etc/init.d/mysql /etc/rc3.d/S91mysql | |||
shell> ln /etc/init.d/mysql /etc/rc0.d/K02mysql | shell> ln /etc/init.d/mysql /etc/rc0.d/K02mysql | |||
skipping to change at line 3597 | skipping to change at line 3655 | |||
this in combination with the pkgrm command to remove the | this in combination with the pkgrm command to remove the | |||
installation. | installation. | |||
To upgrade when using the Solaris package file format, you must | To upgrade when using the Solaris package file format, you must | |||
remove the existing installation before installing the updated | remove the existing installation before installing the updated | |||
package. Removal of the package does not delete the existing | package. Removal of the package does not delete the existing | |||
database information, only the server, binaries and support files. | database information, only the server, binaries and support files. | |||
The typical upgrade sequence is therefore: | The typical upgrade sequence is therefore: | |||
shell> mysqladmin shutdown | shell> mysqladmin shutdown | |||
shell> pkgrm mysql | shell> pkgrm mysql | |||
shell> pkgadd -d mysql-5.6.12-solaris10-x86_64.pkg | shell> pkgadd -d mysql-5.6.13-solaris10-x86_64.pkg | |||
shell> mysqld_safe & | shell> mysqld_safe & | |||
shell> mysql_upgrade | shell> mysql_upgrade | |||
You should check the notes in Section 2.11, "Upgrading or | You should check the notes in Section 2.11, "Upgrading or | |||
Downgrading MySQL" before performing any upgrade. | Downgrading MySQL" before performing any upgrade. | |||
2.6.2. Installing MySQL on OpenSolaris using IPS | 2.6.2. Installing MySQL on OpenSolaris Using IPS | |||
OpenSolaris includes standard packages for MySQL in the core | OpenSolaris includes standard packages for MySQL in the core | |||
repository. The MySQL packages are based on a specific release of | repository. The MySQL packages are based on a specific release of | |||
MySQL and updated periodically. For the latest release you must | MySQL and updated periodically. For the latest release you must | |||
use either the native Solaris PKG, tar, or source installations. | use either the native Solaris PKG, tar, or source installations. | |||
The native OpenSolaris packages include SMF files so that you can | The native OpenSolaris packages include SMF files so that you can | |||
easily control your MySQL installation, including automatic | easily control your MySQL installation, including automatic | |||
startup and recovery, using the native service management tools. | startup and recovery, using the native service management tools. | |||
To install MySQL on OpenSolaris, use the pkg command. You will | To install MySQL on OpenSolaris, use the pkg command. You will | |||
skipping to change at line 3680 | skipping to change at line 3738 | |||
shell> svcadm refresh mysql | shell> svcadm refresh mysql | |||
2.7. Installing MySQL on HP-UX | 2.7. Installing MySQL on HP-UX | |||
MySQL for HP-UX is available in a number of different forms: | MySQL for HP-UX is available in a number of different forms: | |||
* Using a DEPOT distribution provided at | * Using a DEPOT distribution provided at | |||
http://dev.mysql.com/downloads/. Please read the general notes | http://dev.mysql.com/downloads/. Please read the general notes | |||
on HP-UX installation before continuing. For more information | on HP-UX installation before continuing. For more information | |||
on DEPOT installations, see Section 2.7.2, "Installing MySQL | on DEPOT installations, see Section 2.7.2, "Installing MySQL | |||
on HP-UX using DEPOT." | on HP-UX Using DEPOT Packages." | |||
* Using a binary tarball distribution provided at | * Using a binary tarball distribution provided at | |||
http://dev.mysql.com/downloads/. Please read the general notes | http://dev.mysql.com/downloads/. Please read the general notes | |||
on HP-UX installation before continuing. For more information | on HP-UX installation before continuing. For more information | |||
on binary installations, see Section 2.2, "Installing MySQL | on binary installations, see Section 2.2, "Installing MySQL on | |||
from Generic Binaries on Unix/Linux." | Unix/Linux Using Generic Binaries." | |||
2.7.1. General Notes on Installing MySQL on HP-UX | 2.7.1. General Notes on Installing MySQL on HP-UX | |||
Some additional notes on installing and using MySQL on HP-UX: | Some additional notes on installing and using MySQL on HP-UX: | |||
* If you install MySQL using a binary tarball distribution on | * If you install MySQL using a binary tarball distribution on | |||
HP-UX, you may run into trouble even before you get the MySQL | HP-UX, you may run into trouble even before you get the MySQL | |||
distribution unpacked, as the HP-UX tar cannot handle long | distribution unpacked, as the HP-UX tar cannot handle long | |||
file names. This means that you may see errors when you try to | file names. This means that you may see errors when you try to | |||
unpack MySQL. | unpack MySQL. | |||
skipping to change at line 3708 | skipping to change at line 3766 | |||
distribution. | distribution. | |||
* Because of some critical bugs in the standard HP-UX libraries, | * Because of some critical bugs in the standard HP-UX libraries, | |||
you should install the following patches before trying to run | you should install the following patches before trying to run | |||
MySQL on HP-UX 11.0: | MySQL on HP-UX 11.0: | |||
PHKL_22840 Streams cumulative | PHKL_22840 Streams cumulative | |||
PHNE_22397 ARPA cumulative | PHNE_22397 ARPA cumulative | |||
This solves the problem of getting EWOULDBLOCK from recv() and | This solves the problem of getting EWOULDBLOCK from recv() and | |||
EBADF from accept() in threaded applications. | EBADF from accept() in threaded applications. | |||
2.7.2. Installing MySQL on HP-UX using DEPOT | 2.7.2. Installing MySQL on HP-UX Using DEPOT Packages | |||
The HP-UX DEPOT format packages can be installed using the | The HP-UX DEPOT format packages can be installed using the | |||
swinstall command. You should install the ncurses and zlib | swinstall command. You should install the ncurses and zlib | |||
libraries before installing the MySQL DEPOT package. You can use | libraries before installing the MySQL DEPOT package. You can use | |||
the free software depothelper tool to install these packages and | the free software depothelper tool to install these packages and | |||
any dependencies for you automatically. | any dependencies for you automatically. | |||
To install using the MySQL DEPOT packages, follow this guide: | To install using the MySQL DEPOT packages, follow this guide: | |||
1. Download the MySQL DEPOT package from | 1. Download the MySQL DEPOT package from | |||
http://dev.mysql.com/downloads/. You must decompress the | http://dev.mysql.com/downloads/. You must uncompress the | |||
package before installation: | package before installation: | |||
root-shell> gunzip mysql-5.1.48-hpux11.31-ia64-64bit.depot.gz | root-shell> gunzip mysql-5.1.48-hpux11.31-ia64-64bit.depot.gz | |||
2. Install the DEPOT package using swinstall: | 2. Install the DEPOT package using swinstall: | |||
root-shell> swinstall -s mysql-5.1.49-hpux11.31-ia64-64bit.depot | root-shell> swinstall -s mysql-5.1.49-hpux11.31-ia64-64bit.depot | |||
MySQL will be installed into a directory matching the depot | MySQL will be installed into a directory matching the depot | |||
package name, within /usr/local. For convenience, you may want | package name, within /usr/local. For convenience, you may want | |||
to create a symbolic link to the installed directory, for | to create a symbolic link to the installed directory, for | |||
example: | example: | |||
root-shell> ln -s mysql-5.1.49-hpux11.31-ia64-64bit mysql | root-shell> ln -s mysql-5.1.49-hpux11.31-ia64-64bit mysql | |||
skipping to change at line 3757 | skipping to change at line 3815 | |||
root-shell> mysql_secure_installation | root-shell> mysql_secure_installation | |||
root-shell> mysqld_safe --user=mysql & | root-shell> mysqld_safe --user=mysql & | |||
2.8. Installing MySQL on FreeBSD | 2.8. Installing MySQL on FreeBSD | |||
This section provides information about installing MySQL on | This section provides information about installing MySQL on | |||
variants of FreeBSD Unix. | variants of FreeBSD Unix. | |||
You can install MySQL on FreeBSD by using the binary distribution | You can install MySQL on FreeBSD by using the binary distribution | |||
provided by Oracle. For more information, see Section 2.2, | provided by Oracle. For more information, see Section 2.2, | |||
"Installing MySQL from Generic Binaries on Unix/Linux." | "Installing MySQL on Unix/Linux Using Generic Binaries." | |||
The easiest (and preferred) way to install MySQL is to use the | The easiest (and preferred) way to install MySQL is to use the | |||
mysql-server and mysql-client ports available at | mysql-server and mysql-client ports available at | |||
http://www.freebsd.org/. Using these ports gives you the following | http://www.freebsd.org/. Using these ports gives you the following | |||
benefits: | benefits: | |||
* A working MySQL with all optimizations enabled that are known | * A working MySQL with all optimizations enabled that are known | |||
to work on your version of FreeBSD. | to work on your version of FreeBSD. | |||
* Automatic configuration and build. | * Automatic configuration and build. | |||
skipping to change at line 3820 | skipping to change at line 3878 | |||
parameters, compiler optimizations, and installation location. For | parameters, compiler optimizations, and installation location. For | |||
a list of systems on which MySQL is known to run, see Section | a list of systems on which MySQL is known to run, see Section | |||
2.1.1, "Operating Systems Supported by MySQL Community Server." | 2.1.1, "Operating Systems Supported by MySQL Community Server." | |||
Before you proceed with an installation from source, check whether | Before you proceed with an installation from source, check whether | |||
Oracle produces a precompiled binary distribution for your | Oracle produces a precompiled binary distribution for your | |||
platform and whether it works for you. We put a great deal of | platform and whether it works for you. We put a great deal of | |||
effort into ensuring that our binaries are built with the best | effort into ensuring that our binaries are built with the best | |||
possible options for optimal performance. Instructions for | possible options for optimal performance. Instructions for | |||
installing binary distributions are available in Section 2.2, | installing binary distributions are available in Section 2.2, | |||
"Installing MySQL from Generic Binaries on Unix/Linux." | "Installing MySQL on Unix/Linux Using Generic Binaries." | |||
Source Installation Methods | Source Installation Methods | |||
There are two methods for installing MySQL from source: | There are two methods for installing MySQL from source: | |||
* Use a standard MySQL source distribution. To obtain a standard | * Use a standard MySQL source distribution. To obtain a standard | |||
distribution, see Section 2.1.3, "How to Get MySQL." For | distribution, see Section 2.1.3, "How to Get MySQL." For | |||
instructions on building from a standard distribution, see | instructions on building from a standard distribution, see | |||
Section 2.9.2, "Installing MySQL from a Standard Source | Section 2.9.2, "Installing MySQL Using a Standard Source | |||
Distribution." | Distribution." | |||
Standard distributions are available as compressed tar files, | Standard distributions are available as compressed tar files, | |||
Zip archives, or RPM packages. Distribution files have names | Zip archives, or RPM packages. Distribution files have names | |||
of the form mysql-VERSION.tar.gz, mysql-VERSION.zip, or | of the form mysql-VERSION.tar.gz, mysql-VERSION.zip, or | |||
mysql-VERSION.rpm, where VERSION is a number like 5.6.12. File | mysql-VERSION.rpm, where VERSION is a number like 5.6.13. File | |||
names for source distributions can be distinguished from those | names for source distributions can be distinguished from those | |||
for precompiled binary distributions in that source | for precompiled binary distributions in that source | |||
distribution names are generic and include no platform name, | distribution names are generic and include no platform name, | |||
whereas binary distribution names include a platform name | whereas binary distribution names include a platform name | |||
indicating the type of system for which the distribution is | indicating the type of system for which the distribution is | |||
intended (for example, pc-linux-i686 or winx64). | intended (for example, pc-linux-i686 or winx64). | |||
* Use a MySQL development tree. Development trees have not | * Use a MySQL development tree. Development trees have not | |||
necessarily received the same level of testing as standard | necessarily received the same level of testing as standard | |||
release distributions, so this installation method is usually | release distributions, so this installation method is usually | |||
required only if you need the most recent code changes. For | required only if you need the most recent code changes. For | |||
information on building from one of the development trees, see | information on building from one of the development trees, see | |||
Section 2.9.3, "Installing MySQL from a Development Source | Section 2.9.3, "Installing MySQL Using a Development Source | |||
Tree." | Tree." | |||
Source Installation System Requirements | Source Installation System Requirements | |||
Installation of MySQL from source requires several development | Installation of MySQL from source requires several development | |||
tools. Some of these tools are needed no matter whether you use a | tools. Some of these tools are needed no matter whether you use a | |||
standard source distribution or a development source tree. Other | standard source distribution or a development source tree. Other | |||
tool requirements depend on which installation method you use. | tool requirements depend on which installation method you use. | |||
To install MySQL from source, your system must have the following | To install MySQL from source, your system must have the following | |||
skipping to change at line 3950 | skipping to change at line 4008 | |||
By default, when you install MySQL after compiling it from source, | By default, when you install MySQL after compiling it from source, | |||
the installation step installs files under /usr/local/mysql. The | the installation step installs files under /usr/local/mysql. The | |||
component locations under the installation directory are the same | component locations under the installation directory are the same | |||
as for binary distributions. See Section 2.2, "MySQL Installation | as for binary distributions. See Section 2.2, "MySQL Installation | |||
Layout for Generic Unix/Linux Binary Package," and Section 2.3.1, | Layout for Generic Unix/Linux Binary Package," and Section 2.3.1, | |||
"MySQL Installation Layout on Microsoft Windows." To configure | "MySQL Installation Layout on Microsoft Windows." To configure | |||
installation locations different from the defaults, use the | installation locations different from the defaults, use the | |||
options described at Section 2.9.4, "MySQL Source-Configuration | options described at Section 2.9.4, "MySQL Source-Configuration | |||
Options." | Options." | |||
2.9.2. Installing MySQL from a Standard Source Distribution | 2.9.2. Installing MySQL Using a Standard Source Distribution | |||
To install MySQL from a standard source distribution: | To install MySQL from a standard source distribution: | |||
1. Verify that your system satisfies the tool requirements listed | 1. Verify that your system satisfies the tool requirements listed | |||
at Section 2.9, "Installing MySQL from Source." | at Section 2.9, "Installing MySQL from Source." | |||
2. Obtain a distribution file using the instructions in Section | 2. Obtain a distribution file using the instructions in Section | |||
2.1.3, "How to Get MySQL." | 2.1.3, "How to Get MySQL." | |||
3. Configure, build, and install the distribution using the | 3. Configure, build, and install the distribution using the | |||
skipping to change at line 3978 | skipping to change at line 4036 | |||
produce a working installation. For additional information on | produce a working installation. For additional information on | |||
using CMake to build MySQL, see How to Build MySQL Server with | using CMake to build MySQL, see How to Build MySQL Server with | |||
CMake (http://dev.mysql.com/doc/internals/en/cmake.html). | CMake (http://dev.mysql.com/doc/internals/en/cmake.html). | |||
If you start from a source RPM, use the following command to make | If you start from a source RPM, use the following command to make | |||
a binary RPM that you can install. If you do not have rpmbuild, | a binary RPM that you can install. If you do not have rpmbuild, | |||
use rpm instead. | use rpm instead. | |||
shell> rpmbuild --rebuild --clean MySQL-VERSION.src.rpm | shell> rpmbuild --rebuild --clean MySQL-VERSION.src.rpm | |||
The result is one or more binary RPM packages that you install as | The result is one or more binary RPM packages that you install as | |||
indicated in Section 2.5.1, "Installing MySQL from RPM Packages on | indicated in Section 2.5.1, "Installing MySQL on Linux Using RPM | |||
Linux." | Packages." | |||
The sequence for installation from a compressed tar file or Zip | The sequence for installation from a compressed tar file or Zip | |||
archive source distribution is similar to the process for | archive source distribution is similar to the process for | |||
installing from a generic binary distribution (see Section 2.2, | installing from a generic binary distribution (see Section 2.2, | |||
"Installing MySQL from Generic Binaries on Unix/Linux"), except | "Installing MySQL on Unix/Linux Using Generic Binaries"), except | |||
that it is used on all platforms and includes steps to configure | that it is used on all platforms and includes steps to configure | |||
and compile the distribution. For example, with a compressed tar | and compile the distribution. For example, with a compressed tar | |||
file source distribution on Unix, the basic installation command | file source distribution on Unix, the basic installation command | |||
sequence looks like this: | sequence looks like this: | |||
# Preconfiguration setup | # Preconfiguration setup | |||
shell> groupadd mysql | shell> groupadd mysql | |||
shell> useradd -r -g mysql mysql | shell> useradd -r -g mysql mysql | |||
# Beginning of source-build specific instructions | # Beginning of source-build specific instructions | |||
shell> tar zxvf mysql-VERSION.tar.gz | shell> tar zxvf mysql-VERSION.tar.gz | |||
shell> cd mysql-VERSION | shell> cd mysql-VERSION | |||
skipping to change at line 4026 | skipping to change at line 4084 | |||
The procedure shown here does not set up any passwords for MySQL | The procedure shown here does not set up any passwords for MySQL | |||
accounts. After following the procedure, proceed to Section 2.10, | accounts. After following the procedure, proceed to Section 2.10, | |||
"Postinstallation Setup and Testing," for postinstallation setup | "Postinstallation Setup and Testing," for postinstallation setup | |||
and testing. | and testing. | |||
Perform Preconfiguration Setup | Perform Preconfiguration Setup | |||
On Unix, set up the mysql user and group that will be used to run | On Unix, set up the mysql user and group that will be used to run | |||
and execute the MySQL server and own the database directory. For | and execute the MySQL server and own the database directory. For | |||
details, see Creating a mysql System User and Group, in Section | details, see Creating a mysql System User and Group, in Section | |||
2.2, "Installing MySQL from Generic Binaries on Unix/Linux." Then | 2.2, "Installing MySQL on Unix/Linux Using Generic Binaries." Then | |||
perform the following steps as the mysql user, except as noted. | perform the following steps as the mysql user, except as noted. | |||
Obtain and Unpack the Distribution | Obtain and Unpack the Distribution | |||
Pick the directory under which you want to unpack the distribution | Pick the directory under which you want to unpack the distribution | |||
and change location into it. | and change location into it. | |||
Obtain a distribution file using the instructions in Section | Obtain a distribution file using the instructions in Section | |||
2.1.3, "How to Get MySQL." | 2.1.3, "How to Get MySQL." | |||
skipping to change at line 4189 | skipping to change at line 4247 | |||
To install in a specific directory, add a DESTDIR parameter to the | To install in a specific directory, add a DESTDIR parameter to the | |||
command line: | command line: | |||
shell> make install DESTDIR="/opt/mysql" | shell> make install DESTDIR="/opt/mysql" | |||
Alternatively, generate installation package files that you can | Alternatively, generate installation package files that you can | |||
install where you like: | install where you like: | |||
shell> make package | shell> make package | |||
This operation produces one or more .tar.gz files that can be | This operation produces one or more .tar.gz files that can be | |||
installed like generic binary distribution packages. See Section | installed like generic binary distribution packages. See Section | |||
2.2, "Installing MySQL from Generic Binaries on Unix/Linux." If | 2.2, "Installing MySQL on Unix/Linux Using Generic Binaries." If | |||
you run CMake with -DCPACK_MONOLITHIC_INSTALL=1, the operation | you run CMake with -DCPACK_MONOLITHIC_INSTALL=1, the operation | |||
produces a single file. Otherwise, it produces multiple files. | produces a single file. Otherwise, it produces multiple files. | |||
On Windows, generate the data directory, then create a .zip | On Windows, generate the data directory, then create a .zip | |||
archive installation package: | archive installation package: | |||
shell> devenv MySQL.sln /build RelWithDebInfo /project initial_databa | shell> devenv MySQL.sln /build RelWithDebInfo /project initial_databa | |||
se | se | |||
shell> devenv MySQL.sln /build RelWithDebInfo /project package | shell> devenv MySQL.sln /build RelWithDebInfo /project package | |||
You can install the resulting .zip archive where you like. See | You can install the resulting .zip archive where you like. See | |||
skipping to change at line 4216 | skipping to change at line 4274 | |||
configuration file, creating the core databases, and starting the | configuration file, creating the core databases, and starting the | |||
MySQL server. For instructions, see Section 2.10, | MySQL server. For instructions, see Section 2.10, | |||
"Postinstallation Setup and Testing." | "Postinstallation Setup and Testing." | |||
Note | Note | |||
The accounts that are listed in the MySQL grant tables initially | The accounts that are listed in the MySQL grant tables initially | |||
have no passwords. After starting the server, you should set up | have no passwords. After starting the server, you should set up | |||
passwords for them using the instructions in Section 2.10, | passwords for them using the instructions in Section 2.10, | |||
"Postinstallation Setup and Testing." | "Postinstallation Setup and Testing." | |||
2.9.3. Installing MySQL from a Development Source Tree | 2.9.3. Installing MySQL Using a Development Source Tree | |||
This section discusses how to install MySQL from the latest | This section discusses how to install MySQL from the latest | |||
development source code. Development trees have not necessarily | development source code. Development trees have not necessarily | |||
received the same level of testing as standard release | received the same level of testing as standard release | |||
distributions, so this installation method is usually required | distributions, so this installation method is usually required | |||
only if you need the most recent code changes. Do not use a | only if you need the most recent code changes. Do not use a | |||
development tree for production systems. If your goal is simply to | development tree for production systems. If your goal is simply to | |||
get MySQL up and running on your system, you should use a standard | get MySQL up and running on your system, you should use a standard | |||
release distribution (either a binary or source distribution). See | release distribution (either a binary or source distribution). See | |||
Section 2.1.3, "How to Get MySQL." | Section 2.1.3, "How to Get MySQL." | |||
skipping to change at line 4291 | skipping to change at line 4349 | |||
online at the Launchpad MySQL Server | online at the Launchpad MySQL Server | |||
(http://launchpad.net/mysql-server) page. | (http://launchpad.net/mysql-server) page. | |||
If you see diffs (changes) or code that you have a question | If you see diffs (changes) or code that you have a question | |||
about, do not hesitate to send email to the MySQL internals | about, do not hesitate to send email to the MySQL internals | |||
mailing list. See Section 1.6.1, "MySQL Mailing Lists." If you | mailing list. See Section 1.6.1, "MySQL Mailing Lists." If you | |||
think you have a better idea on how to do something, send an | think you have a better idea on how to do something, send an | |||
email message to the list with a patch. | email message to the list with a patch. | |||
After you have the local branch, you can build MySQL server from | After you have the local branch, you can build MySQL server from | |||
the source code. For information, see Section 2.9.2, "Installing | the source code. For information, see Section 2.9.2, "Installing | |||
MySQL from a Standard Source Distribution," except that you skip | MySQL Using a Standard Source Distribution," except that you skip | |||
the part about obtaining and unpacking the distribution. | the part about obtaining and unpacking the distribution. | |||
Be careful about installing a build from a distribution source | Be careful about installing a build from a distribution source | |||
tree on a production machine. The installation command may | tree on a production machine. The installation command may | |||
overwrite your live release installation. If you already have | overwrite your live release installation. If you already have | |||
MySQL installed and do not want to overwrite it, run CMake with | MySQL installed and do not want to overwrite it, run CMake with | |||
values for the CMAKE_INSTALL_PREFIX, MYSQL_TCP_PORT, and | values for the CMAKE_INSTALL_PREFIX, MYSQL_TCP_PORT, and | |||
MYSQL_UNIX_ADDR options different from those used by your | MYSQL_UNIX_ADDR options different from those used by your | |||
production server. For additional information about preventing | production server. For additional information about preventing | |||
multiple servers from interfering with each other, see Section | multiple servers from interfering with each other, see Section | |||
5.6, "Running Multiple MySQL Instances on One Machine." | 5.6, "Running Multiple MySQL Instances on One Machine." | |||
Play hard with your new installation. For example, try to make new | Play hard with your new installation. For example, try to make new | |||
features crash. Start by running make test. See Section 22.1.2, | features crash. Start by running make test. See Section 23.1.2, | |||
"The MySQL Test Suite." | "The MySQL Test Suite." | |||
2.9.4. MySQL Source-Configuration Options | 2.9.4. MySQL Source-Configuration Options | |||
The CMake program provides a great deal of control over how you | The CMake program provides a great deal of control over how you | |||
configure a MySQL source distribution. Typically, you do this | configure a MySQL source distribution. Typically, you do this | |||
using options on the CMake command line. For information about | using options on the CMake command line. For information about | |||
options supported by CMake, run either of these commands in the | options supported by CMake, run either of these commands in the | |||
top-level source directory: | top-level source directory: | |||
shell> cmake . -LH | shell> cmake . -LH | |||
skipping to change at line 4327 | skipping to change at line 4385 | |||
You can also affect CMake using certain environment variables. See | You can also affect CMake using certain environment variables. See | |||
Section 2.12, "Environment Variables." | Section 2.12, "Environment Variables." | |||
The following table shows the available CMake options. In the | The following table shows the available CMake options. In the | |||
Default column, PREFIX stands for the value of the | Default column, PREFIX stands for the value of the | |||
CMAKE_INSTALL_PREFIX option, which specifies the installation base | CMAKE_INSTALL_PREFIX option, which specifies the installation base | |||
directory. This value is used as the parent location for several | directory. This value is used as the parent location for several | |||
of the installation subdirectories. | of the installation subdirectories. | |||
Table 2.12. MySQL Source-Configuration Option Reference (CMake) | Table 2.13. MySQL Source-Configuration Option Reference (CMake) | |||
Formats Description Default Introduced Removed | Formats Description Default Introduced Removed | |||
BUILD_CONFIG Use same build options as official releases | BUILD_CONFIG Use same build options as official releases | |||
CMAKE_BUILD_TYPE Type of build to produce RelWithDebInfo | CMAKE_BUILD_TYPE Type of build to produce RelWithDebInfo | |||
CMAKE_INSTALL_PREFIX Installation base directory /usr/local/mysql | CMAKE_INSTALL_PREFIX Installation base directory /usr/local/mysql | |||
COMPILATION_COMMENT Comment about compilation environment | COMPILATION_COMMENT Comment about compilation environment | |||
CPACK_MONOLITHIC_INSTALL Whether package build produces single | CPACK_MONOLITHIC_INSTALL Whether package build produces single | |||
file OFF | file OFF | |||
DEFAULT_CHARSET The default server character set latin1 | DEFAULT_CHARSET The default server character set latin1 | |||
DEFAULT_COLLATION The default server collation latin1_swedish_ci | DEFAULT_COLLATION The default server collation latin1_swedish_ci | |||
skipping to change at line 4369 | skipping to change at line 4427 | |||
INSTALL_MYSQLSHAREDIR Shared data directory PREFIX/share | INSTALL_MYSQLSHAREDIR Shared data directory PREFIX/share | |||
INSTALL_MYSQLTESTDIR mysql-test directory PREFIX/mysql-test | INSTALL_MYSQLTESTDIR mysql-test directory PREFIX/mysql-test | |||
INSTALL_PLUGINDIR Plugin directory PREFIX/lib/plugin | INSTALL_PLUGINDIR Plugin directory PREFIX/lib/plugin | |||
INSTALL_SBINDIR Server executable directory PREFIX/bin | INSTALL_SBINDIR Server executable directory PREFIX/bin | |||
INSTALL_SCRIPTDIR Scripts directory PREFIX/scripts | INSTALL_SCRIPTDIR Scripts directory PREFIX/scripts | |||
INSTALL_SHAREDIR aclocal/mysql.m4 installation directory | INSTALL_SHAREDIR aclocal/mysql.m4 installation directory | |||
PREFIX/share | PREFIX/share | |||
INSTALL_SQLBENCHDIR sql-bench directory PREFIX | INSTALL_SQLBENCHDIR sql-bench directory PREFIX | |||
INSTALL_SUPPORTFILESDIR Extra support files directory | INSTALL_SUPPORTFILESDIR Extra support files directory | |||
PREFIX/support-files | PREFIX/support-files | |||
MEMCACHED_HOME Path to memcached [none] | ||||
MYSQL_DATADIR Data directory | MYSQL_DATADIR Data directory | |||
MYSQL_MAINTAINER_MODE Whether to enable MySQL maintainer-specific | MYSQL_MAINTAINER_MODE Whether to enable MySQL maintainer-specific | |||
development environment OFF | development environment OFF | |||
MYSQL_PROJECT_NAME Windows/Mac OS X project name 3306 5.6.5 | MYSQL_PROJECT_NAME Windows/Mac OS X project name 3306 5.6.5 | |||
MYSQL_TCP_PORT TCP/IP port number 3306 | MYSQL_TCP_PORT TCP/IP port number 3306 | |||
MYSQL_UNIX_ADDR Unix socket file /tmp/mysql.sock | MYSQL_UNIX_ADDR Unix socket file /tmp/mysql.sock | |||
ODBC_INCLUDES ODBC includes directory | ODBC_INCLUDES ODBC includes directory | |||
ODBC_LIB_DIR ODBC library directory | ODBC_LIB_DIR ODBC library directory | |||
OPTIMIZER_TRACE Whether to support optimizer tracing 5.6.3 | OPTIMIZER_TRACE Whether to support optimizer tracing 5.6.3 | |||
SYSCONFDIR Option file directory | SYSCONFDIR Option file directory | |||
WITH_BUNDLED_LIBEVENT Use bundled libevent when building | ||||
ndbmemcache ON | ||||
WITH_BUNDLED_MEMCACHED Use bundled memcached when building | ||||
ndbmemcache ON | ||||
WITH_CLASSPATH Classpath to use when building MySQL Cluster | ||||
Connector for Java. Default is an empty string. | ||||
WITH_DEBUG Whether to include debugging support OFF | WITH_DEBUG Whether to include debugging support OFF | |||
WITH_DEFAULT_COMPILER_OPTIONS Whether to use default compiler | WITH_DEFAULT_COMPILER_OPTIONS Whether to use default compiler | |||
options ON 5.6.6 | options ON 5.6.6 | |||
WITH_DEFAULT_FEATURE_SET Whether to use default feature set ON | WITH_DEFAULT_FEATURE_SET Whether to use default feature set ON | |||
5.6.6 | 5.6.6 | |||
WITH_EDITLINE Which libedit/editline library to use bundled 5.6.12 | ||||
WITH_EMBEDDED_SERVER Whether to build embedded server OFF | WITH_EMBEDDED_SERVER Whether to build embedded server OFF | |||
WITH_xxx_STORAGE_ENGINE Compile storage engine xxx statically into | WITH_xxx_STORAGE_ENGINE Compile storage engine xxx statically into | |||
server | server | |||
WITH_ERROR_INSERT Enable error injection in the NDB storage | ||||
engine. Should not be used for building binaries intended for | ||||
production. OFF | ||||
WITH_EXTRA_CHARSETS Which extra character sets to include all | WITH_EXTRA_CHARSETS Which extra character sets to include all | |||
WITH_LIBEDIT Use bundled libedit library ON | WITH_LIBEDIT Use bundled libedit library ON 5.6.12 | |||
WITH_LIBWRAP Whether to include libwrap (TCP wrappers) support OFF | WITH_LIBWRAP Whether to include libwrap (TCP wrappers) support OFF | |||
WITH_NDB_BINLOG Enable binary logging by default by mysqld. ON | ||||
WITH_NDB_DEBUG Produce a debug build for testing or | ||||
troubleshooting. OFF | ||||
WITH_NDB_JAVA Enable building of Java and ClusterJ support. | ||||
Enabled by default. Supported in MySQL Cluster only. ON | ||||
WITH_NDB_PORT Default port used by a management server built with | ||||
this option. If this option was not used to build it, the | ||||
management server's default port is 1186. [none] | ||||
WITH_NDB_TEST Include NDB API test programs. OFF | ||||
WITH_NDBCLUSTER_STORAGE_ENGINE Build the NDB storage engine ON | ||||
WITH_NDBMTD Build multi-threaded data node. ON | ||||
WITH_READLINE Use bundled readline library OFF 5.6.5 | WITH_READLINE Use bundled readline library OFF 5.6.5 | |||
WITH_SSL Type of SSL support no | WITH_SSL Type of SSL support no | |||
WITH_UNIXODBC Enable unixODBC support OFF | WITH_UNIXODBC Enable unixODBC support OFF | |||
WITH_ZLIB Type of zlib support system | WITH_ZLIB Type of zlib support system | |||
WITHOUT_xxx_STORAGE_ENGINE Exclude storage engine xxx from build | WITHOUT_xxx_STORAGE_ENGINE Exclude storage engine xxx from build | |||
The following sections provide more information about CMake | The following sections provide more information about CMake | |||
options. | options. | |||
* General Options | * General Options | |||
* Installation Layout Options | * Installation Layout Options | |||
* Feature Options | * Feature Options | |||
* Options for Compiling MySQL Cluster | ||||
* Compiler Flags | * Compiler Flags | |||
For boolean options, the value may be specified as 1 or ON to | For boolean options, the value may be specified as 1 or ON to | |||
enable the option, or as 0 or OFF to disable the option. | enable the option, or as 0 or OFF to disable the option. | |||
Many options configure compile-time defaults that can be | Many options configure compile-time defaults that can be | |||
overridden at server startup. For example, the | overridden at server startup. For example, the | |||
CMAKE_INSTALL_PREFIX, MYSQL_TCP_PORT, and MYSQL_UNIX_ADDR options | CMAKE_INSTALL_PREFIX, MYSQL_TCP_PORT, and MYSQL_UNIX_ADDR options | |||
that configure the default installation base directory location, | that configure the default installation base directory location, | |||
TCP/IP port number, and Unix socket file can be changed at server | TCP/IP port number, and Unix socket file can be changed at server | |||
skipping to change at line 4567 | skipping to change at line 4650 | |||
(built as a dynamic library that must be installed into the server | (built as a dynamic library that must be installed into the server | |||
using the INSTALL PLUGIN statement or the --plugin-load option | using the INSTALL PLUGIN statement or the --plugin-load option | |||
before it can be used). Some plugins might not support static or | before it can be used). Some plugins might not support static or | |||
dynamic building. | dynamic building. | |||
The MyISAM, MERGE, MEMORY, and CSV engines are mandatory (always | The MyISAM, MERGE, MEMORY, and CSV engines are mandatory (always | |||
compiled into the server) and need not be installed explicitly. | compiled into the server) and need not be installed explicitly. | |||
To compile a storage engine statically into the server, use | To compile a storage engine statically into the server, use | |||
-DWITH_engine_STORAGE_ENGINE=1. Some permissible engine values are | -DWITH_engine_STORAGE_ENGINE=1. Some permissible engine values are | |||
ARCHIVE, BLACKHOLE, EXAMPLE, FEDERATED, INNOBASE (InnoDB), | ARCHIVE, BLACKHOLE, EXAMPLE, FEDERATED, INNOBASE (InnoDB), NDB or | |||
PARTITION (partitioning support), and PERFSCHEMA (Performance | NDBCLUSTER (NDB), PARTITION (partitioning support), and PERFSCHEMA | |||
Schema). Examples: | (Performance Schema). Examples: | |||
-DWITH_INNOBASE_STORAGE_ENGINE=1 | -DWITH_INNOBASE_STORAGE_ENGINE=1 | |||
-DWITH_ARCHIVE_STORAGE_ENGINE=1 | -DWITH_ARCHIVE_STORAGE_ENGINE=1 | |||
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 | -DWITH_BLACKHOLE_STORAGE_ENGINE=1 | |||
-DWITH_PERFSCHEMA_STORAGE_ENGINE=1 | -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 | |||
Note | ||||
WITH_NDBCLUSTER_STORAGE_ENGINE is supported only when building | ||||
MySQL Cluster using the MySQL Cluster sources. It cannot be used | ||||
to enable clustering support in other MySQL source trees or | ||||
distributions. In MySQL Cluster NDB 7.3 source distributions, it | ||||
is enabled by default. See Section 17.2.1.3, "Building MySQL | ||||
Cluster from Source on Linux," and Section 17.2.2.2, "Compiling | ||||
and Installing MySQL Cluster from Source on Windows," for more | ||||
information. | ||||
To exclude a storage engine from the build, use | To exclude a storage engine from the build, use | |||
-DWITHOUT_engine_STORAGE_ENGINE=1. Examples: | -DWITHOUT_engine_STORAGE_ENGINE=1. Examples: | |||
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 | -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 | |||
-DWITHOUT_FEDERATED_STORAGE_ENGINE=1 | -DWITHOUT_FEDERATED_STORAGE_ENGINE=1 | |||
-DWITHOUT_PARTITION_STORAGE_ENGINE=1 | -DWITHOUT_PARTITION_STORAGE_ENGINE=1 | |||
If neither -DWITH_engine_STORAGE_ENGINE nor | If neither -DWITH_engine_STORAGE_ENGINE nor | |||
-DWITHOUT_engine_STORAGE_ENGINE are specified for a given storage | -DWITHOUT_engine_STORAGE_ENGINE are specified for a given storage | |||
engine, the engine is built as a shared module, or excluded if it | engine, the engine is built as a shared module, or excluded if it | |||
cannot be built as a shared module. | cannot be built as a shared module. | |||
skipping to change at line 4707 | skipping to change at line 4801 | |||
* -DWITH_DEFAULT_COMPILER_OPTIONS=bool | * -DWITH_DEFAULT_COMPILER_OPTIONS=bool | |||
Whether to use the flags from | Whether to use the flags from | |||
cmake/build_configurations/compiler_options.cmake. This option | cmake/build_configurations/compiler_options.cmake. This option | |||
was added in MySQL 5.6.6. | was added in MySQL 5.6.6. | |||
* -DWITH_DEFAULT_FEATURE_SET=bool | * -DWITH_DEFAULT_FEATURE_SET=bool | |||
Whether to use the flags from | Whether to use the flags from | |||
cmake/build_configurations/feature_set.cmake. This option was | cmake/build_configurations/feature_set.cmake. This option was | |||
added in MySQL 5.6.6. | added in MySQL 5.6.6. | |||
* -DWITH_EDITLINE=value | ||||
Which libedit/editline library to use. The permitted values | ||||
are bundled (the default) and system. | ||||
WITH_EDITLINE was added in MySQL 5.6.12. It replaces | ||||
WITH_LIBEDIT, which has been removed. | ||||
* -DWITH_EMBEDDED_SERVER=bool | * -DWITH_EMBEDDED_SERVER=bool | |||
Whether to build the libmysqld embedded server library. | Whether to build the libmysqld embedded server library. | |||
* -DWITH_EXTRA_CHARSETS=name | * -DWITH_EXTRA_CHARSETS=name | |||
Which extra character sets to include: | Which extra character sets to include: | |||
+ all: All character sets. This is the default. | + all: All character sets. This is the default. | |||
+ complex: Complex character sets. | + complex: Complex character sets. | |||
+ none: No extra character sets. | + none: No extra character sets. | |||
* -DWITH_LIBEDIT=bool | * -DWITH_LIBEDIT=bool | |||
Whether to use the libedit library bundled with the | Whether to use the libedit library bundled with the | |||
distribution. | distribution. | |||
WITH_LIBEDIT was removed in MySQL 5.6.12. Use WITH_EDITLINE | ||||
instead. | ||||
* -DWITH_LIBWRAP=bool | * -DWITH_LIBWRAP=bool | |||
Whether to include libwrap (TCP wrappers) support. | Whether to include libwrap (TCP wrappers) support. | |||
* -DWITH_READLINE=bool | * -DWITH_READLINE=bool | |||
Whether to use the readline library bundled with the | Whether to use the readline library bundled with the | |||
distribution. This option was removed in MySQL 5.6.5 because | distribution. This option was removed in MySQL 5.6.5 because | |||
readline is no longer bundled. | readline is no longer bundled. | |||
* -DWITH_SSL=ssl_type | * -DWITH_SSL=ssl_type | |||
skipping to change at line 4785 | skipping to change at line 4887 | |||
shell> export CFLAGS CXXFLAGS | shell> export CFLAGS CXXFLAGS | |||
shell> cmake [options] | shell> cmake [options] | |||
The following flags control configuration features: | The following flags control configuration features: | |||
* HAVE_EMBEDDED_PRIVILEGE_CONTROL | * HAVE_EMBEDDED_PRIVILEGE_CONTROL | |||
By default, authentication for connections to the embedded | By default, authentication for connections to the embedded | |||
server is disabled. To enable connection authentication, | server is disabled. To enable connection authentication, | |||
define this flag. | define this flag. | |||
CMake Options for Compiling MySQL Cluster | ||||
The following options are for use when building MySQL Cluster with | ||||
the MySQL Cluster sources; they are not currently supported when | ||||
using sources from the MySQL 5.6 Server tree. | ||||
* -DMEMCACHED_HOME=path | ||||
Perform the build using the memcached (version 1.6 or later) | ||||
installed in the system directory indicated by path. Files | ||||
from this installation that are used in the build include the | ||||
memcached binary, header files, and libraries, as well as the | ||||
memcached_utilities library and the header file | ||||
engine_testapp.h. | ||||
You must leave this option unset when building ndbmemcache | ||||
using the bundled memcached sources (WITH_BUNDLED_MEMCACHED | ||||
option); in other words, the bundled sources are used by | ||||
default). | ||||
This option was added in MySQL Cluster NDB 7.2.2. | ||||
While additional CMake options---such as for SASL | ||||
authorization and for providing dtrace support---are available | ||||
for use when compiling memcached from external sources, these | ||||
options are currently not enabled for the memcached sources | ||||
bundled with MySQL Cluster. | ||||
* -DWITH_BUNDLED_LIBEVENT={ON|OFF} | ||||
Use the libevent included in the MySQL Cluster sources when | ||||
building MySQL Cluster with ndbmemcached support (MySQL | ||||
Cluster NDB 7.2.2 and later). Enabled by default. OFF causes | ||||
the system's libevent to be used instead. | ||||
* -DWITH_BUNDLED_MEMCACHED={ON|OFF} | ||||
Build the memcached sources included in the MySQL Cluster | ||||
source tree (MySQL Cluster NDB 7.2.3 and later), then use the | ||||
resulting memcached server when building the ndbmemcache | ||||
engine. In this case, make install places the memcached binary | ||||
in the installation bin directory, and the ndbmemcache engine | ||||
shared object file ndb_engine.so in the installation lib | ||||
directory. | ||||
This option is ON by default. | ||||
* -DWITH_CLASSPATH=path | ||||
Sets the classpath for building MySQL Cluster Connector for | ||||
Java. Default is empty. In MySQL Cluster NDB 7.2.9 and later, | ||||
this option is ignored if -DWITH_NDB_JAVA=OFF is used. | ||||
* -DWITH_ERROR_INSERT={ON|OFF} | ||||
Enables error injection in the NDB kernel. For testing only; | ||||
not intended for use in building production binaries. Default | ||||
is OFF. | ||||
* -DWITH_NDBCLUSTER_STORAGE_ENGINE={ON|OFF} | ||||
Build and link in support for the NDB (NDBCLUSTER) storage | ||||
engine in mysqld. Default is ON. | ||||
* -DWITH_NDBCLUSTER={ON|OFF} | ||||
This is an alias for WITH_NDBCLUSTER_STORAGE_ENGINE. | ||||
* -DWITH_NDBMTD={ON|OFF} | ||||
Build the multithreaded data node executable ndbmtd. Default | ||||
is ON. | ||||
* -DWITH_NDB_BINLOG={ON|OFF} | ||||
Enable binary logging by default in the mysqld built using | ||||
this option. ON by default. | ||||
* -DWITH_NDB_DEBUG={ON|OFF} | ||||
Enable building the debug versions of the MySQL Cluster | ||||
binaries. OFF by default. | ||||
* -DWITH_NDB_JAVA={ON|OFF} | ||||
Enable building MySQL Cluster with Java support, including | ||||
ClusterJ. | ||||
This option was added in MySQL Cluster NDB 7.2.9, and is ON by | ||||
default. If you do not wish to compile MySQL Cluster with Java | ||||
support, you must disable it explicitly by specifying | ||||
-DWITH_NDB_JAVA=OFF when running CMake. Otherwise, if Java | ||||
cannot be found, configuration of the build fails. | ||||
* -DWITH_NDB_PORT=port | ||||
Causes the MySQL Cluster management server (ndb_mgmd) that is | ||||
built to use this port by default. If this option is unset, | ||||
the resulting management server tries to use port 1186 by | ||||
default. | ||||
* -DWITH_NDB_TEST={ON|OFF} | ||||
If enabled, include a set of NDB API test programs. The | ||||
default is OFF. | ||||
2.9.5. Dealing with Problems Compiling MySQL | 2.9.5. Dealing with Problems Compiling MySQL | |||
The solution to many problems involves reconfiguring. If you do | The solution to many problems involves reconfiguring. If you do | |||
reconfigure, take note of the following: | reconfigure, take note of the following: | |||
* If CMake is run after it has previously been run, it may use | * If CMake is run after it has previously been run, it may use | |||
information that was gathered during its previous invocation. | information that was gathered during its previous invocation. | |||
This information is stored in CMakeCache.txt. When CMake | This information is stored in CMakeCache.txt. When CMake | |||
starts up, it looks for that file and reads its contents if it | starts up, it looks for that file and reads its contents if it | |||
exists, on the assumption that the information is still | exists, on the assumption that the information is still | |||
skipping to change at line 4932 | skipping to change at line 5122 | |||
program. For some installation methods, this program is run for | program. For some installation methods, this program is run for | |||
you automatically if an existing database cannot be found. | you automatically if an existing database cannot be found. | |||
* If you install MySQL on Linux using RPM distributions, the | * If you install MySQL on Linux using RPM distributions, the | |||
server RPM runs mysql_install_db. | server RPM runs mysql_install_db. | |||
* Using the native packaging system on many platforms, including | * Using the native packaging system on many platforms, including | |||
Debian Linux, Ubuntu Linux, Gentoo Linux and others, the | Debian Linux, Ubuntu Linux, Gentoo Linux and others, the | |||
mysql_install_db command is run for you. | mysql_install_db command is run for you. | |||
* If you install MySQL on Mac OS X using a PKG distribution, the | * If you install MySQL on Mac OS X using a DMG distribution, the | |||
installer runs mysql_install_db. | installer runs mysql_install_db. | |||
For other platforms and installation types, including generic | For other platforms and installation types, including generic | |||
binary and source installs, you will need to run mysql_install_db | binary and source installs, you will need to run mysql_install_db | |||
yourself. | yourself. | |||
The following procedure describes how to initialize the grant | The following procedure describes how to initialize the grant | |||
tables (if that has not previously been done) and start the | tables (if that has not previously been done) and start the | |||
server. It also suggests some commands that you can use to test | server. It also suggests some commands that you can use to test | |||
whether the server is accessible and working properly. For | whether the server is accessible and working properly. For | |||
skipping to change at line 4958 | skipping to change at line 5148 | |||
mysql_install_db and perhaps restrict access to test databases. | mysql_install_db and perhaps restrict access to test databases. | |||
For instructions, see Section 2.10.2, "Securing the Initial MySQL | For instructions, see Section 2.10.2, "Securing the Initial MySQL | |||
Accounts." | Accounts." | |||
In the examples shown here, the server runs under the user ID of | In the examples shown here, the server runs under the user ID of | |||
the mysql login account. This assumes that such an account exists. | the mysql login account. This assumes that such an account exists. | |||
Either create the account if it does not exist, or substitute the | Either create the account if it does not exist, or substitute the | |||
name of a different existing login account that you plan to use | name of a different existing login account that you plan to use | |||
for running the server. For information about creating the | for running the server. For information about creating the | |||
account, see Creating a mysql System User and Group, in Section | account, see Creating a mysql System User and Group, in Section | |||
2.2, "Installing MySQL from Generic Binaries on Unix/Linux." | 2.2, "Installing MySQL on Unix/Linux Using Generic Binaries." | |||
1. Change location into the top-level directory of your MySQL | 1. Change location into the top-level directory of your MySQL | |||
installation, represented here by BASEDIR: | installation, represented here by BASEDIR: | |||
shell> cd BASEDIR | shell> cd BASEDIR | |||
BASEDIR is the installation directory for your MySQL instance. | BASEDIR is the installation directory for your MySQL instance. | |||
It is likely to be something like /usr/local/mysql or | It is likely to be something like /usr/local/mysql or | |||
/usr/local. The following steps assume that you have changed | /usr/local. The following steps assume that you have changed | |||
location to this directory. | location to this directory. | |||
You will find several files and subdirectories in the BASEDIR | You will find several files and subdirectories in the BASEDIR | |||
directory. The most important for installation purposes are | directory. The most important for installation purposes are | |||
skipping to change at line 5117 | skipping to change at line 5307 | |||
8. Use mysqladmin to verify that the server is running. The | 8. Use mysqladmin to verify that the server is running. The | |||
following commands provide simple tests to check whether the | following commands provide simple tests to check whether the | |||
server is up and responding to connections: | server is up and responding to connections: | |||
shell> bin/mysqladmin version | shell> bin/mysqladmin version | |||
shell> bin/mysqladmin variables | shell> bin/mysqladmin variables | |||
The output from mysqladmin version varies slightly depending | The output from mysqladmin version varies slightly depending | |||
on your platform and version of MySQL, but should be similar | on your platform and version of MySQL, but should be similar | |||
to that shown here: | to that shown here: | |||
shell> bin/mysqladmin version | shell> bin/mysqladmin version | |||
mysqladmin Ver 14.12 Distrib 5.6.12, for pc-linux-gnu on i686 | mysqladmin Ver 14.12 Distrib 5.6.13, for pc-linux-gnu on i686 | |||
... | ... | |||
Server version 5.6.12 | Server version 5.6.13 | |||
Protocol version 10 | Protocol version 10 | |||
Connection Localhost via UNIX socket | Connection Localhost via UNIX socket | |||
UNIX socket /var/lib/mysql/mysql.sock | UNIX socket /var/lib/mysql/mysql.sock | |||
Uptime: 14 days 5 hours 5 min 21 sec | Uptime: 14 days 5 hours 5 min 21 sec | |||
Threads: 1 Questions: 366 Slow queries: 0 | Threads: 1 Questions: 366 Slow queries: 0 | |||
Opens: 0 Flush tables: 1 Open tables: 19 | Opens: 0 Flush tables: 1 Open tables: 19 | |||
Queries per second avg: 0.000 | Queries per second avg: 0.000 | |||
To see what else you can do with mysqladmin, invoke it with | To see what else you can do with mysqladmin, invoke it with | |||
the --help option. | the --help option. | |||
skipping to change at line 5404 | skipping to change at line 5594 | |||
Startup Item starts the server by invoking mysql.server. See | Startup Item starts the server by invoking mysql.server. See | |||
Section 2.4.3, "Installing the MySQL Startup Item," for | Section 2.4.3, "Installing the MySQL Startup Item," for | |||
details. A MySQL Preference Pane also provides control for | details. A MySQL Preference Pane also provides control for | |||
starting and stopping MySQL through the System Preferences, | starting and stopping MySQL through the System Preferences, | |||
see Section 2.4.4, "Installing and Using the MySQL Preference | see Section 2.4.4, "Installing and Using the MySQL Preference | |||
Pane." | Pane." | |||
* Use the Solaris/OpenSolaris service management framework (SMF) | * Use the Solaris/OpenSolaris service management framework (SMF) | |||
system to initiate and control MySQL startup. For more | system to initiate and control MySQL startup. For more | |||
information, see Section 2.6.2, "Installing MySQL on | information, see Section 2.6.2, "Installing MySQL on | |||
OpenSolaris using IPS." | OpenSolaris Using IPS." | |||
The mysqld_safe and mysql.server scripts, Windows server, | The mysqld_safe and mysql.server scripts, Windows server, | |||
Solaris/OpenSolaris SMF, and the Mac OS X Startup Item (or MySQL | Solaris/OpenSolaris SMF, and the Mac OS X Startup Item (or MySQL | |||
Preference Pane) can be used to start the server manually, or | Preference Pane) can be used to start the server manually, or | |||
automatically at system startup time. mysql.server and the Startup | automatically at system startup time. mysql.server and the Startup | |||
Item also can be used to stop the server. | Item also can be used to stop the server. | |||
To start or stop the server manually using the mysql.server | To start or stop the server manually using the mysql.server | |||
script, invoke it with start or stop arguments: | script, invoke it with start or stop arguments: | |||
shell> mysql.server start | shell> mysql.server start | |||
skipping to change at line 5441 | skipping to change at line 5631 | |||
shutdown. | shutdown. | |||
To start and stop MySQL automatically on your server, you need to | To start and stop MySQL automatically on your server, you need to | |||
add start and stop commands to the appropriate places in your | add start and stop commands to the appropriate places in your | |||
/etc/rc* files. | /etc/rc* files. | |||
If you use the Linux server RPM package | If you use the Linux server RPM package | |||
(MySQL-server-VERSION.rpm), or a native Linux package | (MySQL-server-VERSION.rpm), or a native Linux package | |||
installation, the mysql.server script may be installed in the | installation, the mysql.server script may be installed in the | |||
/etc/init.d directory with the name mysql. See Section 2.5.1, | /etc/init.d directory with the name mysql. See Section 2.5.1, | |||
"Installing MySQL from RPM Packages on Linux," for more | "Installing MySQL on Linux Using RPM Packages," for more | |||
information on the Linux RPM packages. | information on the Linux RPM packages. | |||
Some vendors provide RPM packages that install a startup script | Some vendors provide RPM packages that install a startup script | |||
under a different name such as mysqld. | under a different name such as mysqld. | |||
If you install MySQL from a source distribution or using a binary | If you install MySQL from a source distribution or using a binary | |||
distribution format that does not install mysql.server | distribution format that does not install mysql.server | |||
automatically, you can install it manually. The script can be | automatically, you can install it manually. The script can be | |||
found in the support-files directory under the MySQL installation | found in the support-files directory under the MySQL installation | |||
directory or in a MySQL source tree. | directory or in a MySQL source tree. | |||
skipping to change at line 5515 | skipping to change at line 5705 | |||
basedir=/usr/local/mysql | basedir=/usr/local/mysql | |||
The mysql.server script supports the following options: basedir, | The mysql.server script supports the following options: basedir, | |||
datadir, and pid-file. If specified, they must be placed in an | datadir, and pid-file. If specified, they must be placed in an | |||
option file, not on the command line. mysql.server supports only | option file, not on the command line. mysql.server supports only | |||
start and stop as command-line arguments. | start and stop as command-line arguments. | |||
The following table shows which option groups the server and each | The following table shows which option groups the server and each | |||
startup script read from option files. | startup script read from option files. | |||
Table 2.13. MySQL Startup scripts and supported server option | Table 2.14. MySQL Startup scripts and supported server option | |||
groups | groups | |||
Script Option Groups | Script Option Groups | |||
mysqld [mysqld], [server], [mysqld-major_version] | mysqld [mysqld], [server], [mysqld-major_version] | |||
mysqld_safe [mysqld], [server], [mysqld_safe] | mysqld_safe [mysqld], [server], [mysqld_safe] | |||
mysql.server [mysqld], [mysql.server], [server] | mysql.server [mysqld], [mysql.server], [server] | |||
[mysqld-major_version] means that groups with names like | [mysqld-major_version] means that groups with names like | |||
[mysqld-5.5] and [mysqld-5.6] are read by servers having versions | [mysqld-5.5] and [mysqld-5.6] are read by servers having versions | |||
5.5.x, 5.6.x, and so forth. This feature can be used to specify | 5.5.x, 5.6.x, and so forth. This feature can be used to specify | |||
options that can be read only by servers within a given release | options that can be read only by servers within a given release | |||
skipping to change at line 5563 | skipping to change at line 5753 | |||
and host_name.log, where host_name is the name of your server | and host_name.log, where host_name is the name of your server | |||
host. Then examine the last few lines of these files. On Unix, | host. Then examine the last few lines of these files. On Unix, | |||
use tail to display them: | use tail to display them: | |||
shell> tail host_name.err | shell> tail host_name.err | |||
shell> tail host_name.log | shell> tail host_name.log | |||
* Specify any special options needed by the storage engines you | * Specify any special options needed by the storage engines you | |||
are using. You can create a my.cnf file and specify startup | are using. You can create a my.cnf file and specify startup | |||
options for the engines that you plan to use. If you are going | options for the engines that you plan to use. If you are going | |||
to use storage engines that support transactional tables | to use storage engines that support transactional tables | |||
(InnoDB, NDB | (InnoDB, NDB), be sure that you have them configured the way | |||
(http://dev.mysql.com/doc/refman/5.5/en/mysql-cluster.html)), | you want before starting the server. If you are using InnoDB | |||
be sure that you have them configured the way you want before | tables, see Section 14.2.1.2, "Configuring InnoDB" for | |||
starting the server. If you are using InnoDB tables, see | guidelines and Section 14.2.6, "InnoDB Startup Options and | |||
Section 14.2.1.2, "Configuring InnoDB" for guidelines and | System Variables" for option syntax. | |||
Section 14.2.6, "InnoDB Startup Options and System Variables" | ||||
for option syntax. | ||||
Although storage engines use default values for options that | Although storage engines use default values for options that | |||
you omit, Oracle recommends that you review the available | you omit, Oracle recommends that you review the available | |||
options and specify explicit values for any options whose | options and specify explicit values for any options whose | |||
defaults are not appropriate for your installation. | defaults are not appropriate for your installation. | |||
* Make sure that the server knows where to find the data | * Make sure that the server knows where to find the data | |||
directory. The mysqld server uses this directory as its | directory. The mysqld server uses this directory as its | |||
current directory. This is where it expects to find databases | current directory. This is where it expects to find databases | |||
and where it expects to write log files. The server also | and where it expects to write log files. The server also | |||
writes the pid (process ID) file in the data directory. | writes the pid (process ID) file in the data directory. | |||
skipping to change at line 5933 | skipping to change at line 6121 | |||
Note | Note | |||
On Windows, you can also perform the process described in this | On Windows, you can also perform the process described in this | |||
section during installation with MySQL Installer (see Section | section during installation with MySQL Installer (see Section | |||
2.3.3, "Installing MySQL on Microsoft Windows Using MySQL | 2.3.3, "Installing MySQL on Microsoft Windows Using MySQL | |||
Installer"). On other platforms, the MySQL distribution includes | Installer"). On other platforms, the MySQL distribution includes | |||
mysql_secure_installation, a command-line utility that automates | mysql_secure_installation, a command-line utility that automates | |||
much of the process of securing a MySQL installation. And MySQL | much of the process of securing a MySQL installation. And MySQL | |||
Workbench is available on all platforms, and also offers the | Workbench is available on all platforms, and also offers the | |||
ability to manage user accounts (see Chapter 24, "MySQL Workbench" | ability to manage user accounts (see Chapter 25, "MySQL Workbench" | |||
). | ). | |||
2.11. Upgrading or Downgrading MySQL | 2.11. Upgrading or Downgrading MySQL | |||
This section describes the steps to upgrade or downgrade a MySQL | This section describes the steps to upgrade or downgrade a MySQL | |||
installation. | installation. | |||
Upgrading is a common procedure, as you pick up bug fixes within | Upgrading is a common procedure, as you pick up bug fixes within | |||
the same MySQL release series or significant features between | the same MySQL release series or significant features between | |||
major MySQL releases. You perform this procedure first on some | major MySQL releases. You perform this procedure first on some | |||
skipping to change at line 6612 | skipping to change at line 6800 | |||
To check whether a table has indexes that must be rebuilt, consult | To check whether a table has indexes that must be rebuilt, consult | |||
the following list. It indicates which versions of MySQL | the following list. It indicates which versions of MySQL | |||
introduced character set or collation changes that require indexes | introduced character set or collation changes that require indexes | |||
to be rebuilt. Each entry indicates the version in which the | to be rebuilt. Each entry indicates the version in which the | |||
change occurred and the character sets or collations that the | change occurred and the character sets or collations that the | |||
change affects. If the change is associated with a particular bug | change affects. If the change is associated with a particular bug | |||
report, the bug number is given. | report, the bug number is given. | |||
The list applies both for binary upgrades and downgrades. For | The list applies both for binary upgrades and downgrades. For | |||
example, Bug #27877 was fixed in MySQL 5.1.24 and 5.4.0, so it | example, Bug #27877 was fixed in MySQL 5.1.24, so it applies to | |||
applies to upgrades from versions older than 5.1.24 to 5.1.24 or | upgrades from versions older than 5.1.24 to 5.1.24 or newer, and | |||
newer, and to downgrades from 5.1.24 or newer to versions older | to downgrades from 5.1.24 or newer to versions older than 5.1.24. | |||
than 5.1.24. | ||||
In many cases, you can use CHECK TABLE ... FOR UPGRADE to identify | In many cases, you can use CHECK TABLE ... FOR UPGRADE to identify | |||
tables for which index rebuilding is required. It will report this | tables for which index rebuilding is required. It will report this | |||
message: | message: | |||
Table upgrade required. | Table upgrade required. | |||
Please do "REPAIR TABLE `tbl_name`" or dump/reload to fix it! | Please do "REPAIR TABLE `tbl_name`" or dump/reload to fix it! | |||
In these cases, you can also use mysqlcheck --check-upgrade or | In these cases, you can also use mysqlcheck --check-upgrade or | |||
mysql_upgrade, which execute CHECK TABLE. However, the use of | mysql_upgrade, which execute CHECK TABLE. However, the use of | |||
CHECK TABLE applies only after upgrades, not downgrades. Also, | CHECK TABLE applies only after upgrades, not downgrades. Also, | |||
CHECK TABLE is not applicable to all storage engines. For details | CHECK TABLE is not applicable to all storage engines. For details | |||
about which storage engines CHECK TABLE supports, see Section | about which storage engines CHECK TABLE supports, see Section | |||
13.7.2.2, "CHECK TABLE Syntax." | 13.7.2.2, "CHECK TABLE Syntax." | |||
These changes cause index rebuilding to be necessary: | These changes cause index rebuilding to be necessary: | |||
* MySQL 5.1.24, 5.4.0 (Bug #27877) | * MySQL 5.1.24 (Bug #27877) | |||
Affects indexes that use the utf8_general_ci or | Affects indexes that use the utf8_general_ci or | |||
ucs2_general_ci collation for columns that contain 'ß' LATIN | ucs2_general_ci collation for columns that contain 'ß' LATIN | |||
SMALL LETTER SHARP S (German). The bug fix corrected an error | SMALL LETTER SHARP S (German). The bug fix corrected an error | |||
in the original collations but introduced an incompatibility | in the original collations but introduced an incompatibility | |||
such that 'ß' compares equal to characters with which it | such that 'ß' compares equal to characters with which it | |||
previously compared different. | previously compared different. | |||
Affected tables can be detected by CHECK TABLE ... FOR UPGRADE | Affected tables can be detected by CHECK TABLE ... FOR UPGRADE | |||
as of MySQL 5.1.30, 5.4.0 (see Bug #40053). | as of MySQL 5.1.30 (see Bug #40053). | |||
A workaround for this issue is implemented as of MySQL 5.1.62, | A workaround for this issue is implemented as of MySQL 5.1.62, | |||
5.5.21, and 5.6.5. The workaround involves altering affected | 5.5.21, and 5.6.5. The workaround involves altering affected | |||
columns to use the utf8_general_mysql500_ci and | columns to use the utf8_general_mysql500_ci and | |||
ucs2_general_mysql500_ci collations, which preserve the | ucs2_general_mysql500_ci collations, which preserve the | |||
original pre-5.1.24 ordering of utf8_general_ci and | original pre-5.1.24 ordering of utf8_general_ci and | |||
ucs2_general_ci. | ucs2_general_ci. | |||
* MySQL 5.0.48, 5.1.23 (Bug #27562) | * MySQL 5.0.48, 5.1.23 (Bug #27562) | |||
Affects indexes that use the ascii_general_ci collation for | Affects indexes that use the ascii_general_ci collation for | |||
columns that contain any of these characters: '`' GRAVE | columns that contain any of these characters: '`' GRAVE | |||
ACCENT, '[' LEFT SQUARE BRACKET, '\' REVERSE SOLIDUS, ']' | ACCENT, '[' LEFT SQUARE BRACKET, '\' REVERSE SOLIDUS, ']' | |||
RIGHT SQUARE BRACKET, '~' TILDE | RIGHT SQUARE BRACKET, '~' TILDE | |||
Affected tables can be detected by CHECK TABLE ... FOR UPGRADE | Affected tables can be detected by CHECK TABLE ... FOR UPGRADE | |||
as of MySQL 5.1.29, 5.4.0 (see Bug #39585). | as of MySQL 5.1.29 (see Bug #39585). | |||
* MySQL 5.0.48, 5.1.21 (Bug #29461) | * MySQL 5.0.48, 5.1.21 (Bug #29461) | |||
Affects indexes for columns that use any of these character | Affects indexes for columns that use any of these character | |||
sets: eucjpms, euc_kr, gb2312, latin7, macce, ujis | sets: eucjpms, euc_kr, gb2312, latin7, macce, ujis | |||
Affected tables can be detected by CHECK TABLE ... FOR UPGRADE | Affected tables can be detected by CHECK TABLE ... FOR UPGRADE | |||
as of MySQL 5.1.29, 5.4.0 (see Bug #39585). | as of MySQL 5.1.29 (see Bug #39585). | |||
2.11.4. Rebuilding or Repairing Tables or Indexes | 2.11.4. Rebuilding or Repairing Tables or Indexes | |||
This section describes how to rebuild a table, following changes | This section describes how to rebuild a table, following changes | |||
to MySQL such as how data types or character sets are handled. For | to MySQL such as how data types or character sets are handled. For | |||
example, an error in a collation might have been corrected, | example, an error in a collation might have been corrected, | |||
requiring a table rebuild to update the indexes for character | requiring a table rebuild to update the indexes for character | |||
columns that use the collation. (For examples, see Section 2.11.3, | columns that use the collation. (For examples, see Section 2.11.3, | |||
"Checking Whether Tables or Indexes Must Be Rebuilt.") You might | "Checking Whether Tables or Indexes Must Be Rebuilt.") You might | |||
also need to repair or upgrade a table, as indicated by a table | also need to repair or upgrade a table, as indicated by a table | |||
End of changes. 105 change blocks. | ||||
154 lines changed or deleted | 341 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |