RSS
热门关键字:  数据挖掘  人工智能  数据仓库  搜索引擎  数据挖掘导论

MySQL Reference Manual for version 5.0.3

来源: 作者: 时间:2007-12-30 点击:

本文由网龙AE产品自动生成

数据挖掘研究院

<< Back to man.ChinaUnix.net

Go to the first, previous, next, last section, table of contents.


2 Installing MySQL

数据挖掘实验室

This chapter describes how to obtain and install MySQL: 数据挖掘研究院

  1. Determine whether your platform is supported. Please note that not all supported systems are equally good for running MySQL on them. On some it is much more robust and efficient than others. See section 2.1.1 Operating Systems Supported by MySQL for details.
  2. Choose which distribution to install. Several versions of MySQL are available, and most are available in several distribution formats. You can choose from pre-packaged distributions containing binary (precompiled) programs or source code. When in doubt, use a binary distribution. We also provide public access to our current source tree for those who want to see our most recent developments and help us test new code. To determine which version and type of distribution you should use, see section 2.1.2 Choosing Which MySQL Distribution to Install.
  3. Download the distribution that you want to install. For a list of sites from which you can obtain MySQL, see section 2.1.3 How to Get MySQL. You can verify the integrity of the distribution using the instructions in section 2.1.4 Verifying Package Integrity Using MD5 Checksums or GnuPG.
  4. Install the distribution. To install MySQL from a binary distribution, use the instructions in section 2.2 Standard MySQL Installation Using a Binary Distribution. To install MySQL from a source distribution or from the current development source tree, use the instructions in section 2.8 MySQL Installation Using a Source Distribution. Note: If you plan to upgrade an existing version of MySQL to a newer version rather than installing MySQL for the first time, see section 2.10 Upgrading MySQL for information about upgrade procedures and about issues that you should consider before upgrading. If you encounter installation difficulties, see section 2.12 Operating System-Specific Notes for information on solving problems for particular platforms.
  5. Perform any necessary post-installation setup. After installing MySQL, read section 2.9 Post-Installation Setup and Testing. This section contains important information about making sure the MySQL server is working properly. It also describes how to secure the initial MySQL user accounts, which have no passwords until you assign passwords. The section applies whether you install MySQL using a binary or source distribution.
  6. If you want to run the MySQL benchmark scripts, Perl support for MySQL must be available. See section 2.13 Perl Installation Notes.

2.1 General Installation Issues

Before installing MySQL, you should do the following: 数据挖掘研究院

  1. Determine whether or not MySQL runs on your platform.
  2. Choose a distribution to install.
  3. Download the distribution and verify its integrity.

This section contains the information necessary to carry out these steps. After doing so, you can use the instructions in later sections of the chapter to install the distribution that you choose. 数据挖掘研究院

2.1.1 Operating Systems Supported by MySQL

数据挖掘研究院

This section lists the operating systems on which you can expect to be able to run MySQL.

数据挖掘研究院

We use GNU Autoconf, so it is possible to port MySQL to all modern systems that have a C++ compiler and a working implementation of POSIX threads. (Thread support is needed for the server. To compile only the client code, the only requirement is a C++ compiler.) We use and develop the software ourselves primarily on Linux (SuSE and Red Hat), FreeBSD, and Sun Solaris (Versions 8 and 9). 数据挖掘研究院

MySQL has been reported to compile successfully on the following combinations of operating system and thread package. Note that for many operating systems, native thread support works only in the latest versions. 数据挖掘研究院

Not all platforms are equally well-suited for running MySQL. How well a certain platform is suited for a high-load mission-critical MySQL server is determined by the following factors:

  • General stability of the thread library. A platform may have an excellent reputation otherwise, but MySQL will be only as stable as the thread library if that library is unstable in the code that is called by MySQL, even if everything else is perfect.
  • The capability of the kernel and the thread library to take advantage of symmetric multi-processor (SMP) systems. In other words, when a process creates a thread, it should be possible for that thread to run on a different CPU than the original process.
  • The capability of the kernel and the thread library to run many threads that acquire and release a mutex over a short critical region frequently without excessive context switches. If the implementation of pthread_mutex_lock() is too anxious to yield CPU time, this will hurt MySQL tremendously. If this issue is not taken care of, adding extra CPUs will actually make MySQL slower.
  • General filesystem stability and performance.
  • If your tables are big, the ability of the filesystem to deal with large files at all and to deal with them efficiently.
  • Our level of expertise here at MySQL AB with the platform. If we know a platform well, we enable platform-specific optimizations and fixes at compile time. We can also provide advice on configuring your system optimally for MySQL.
  • The amount of testing we have done internally for similar configurations.
  • The number of users that have successfully run MySQL on the platform in similar configurations. If this number is high, the chances of encountering platform-specific surprises are much smaller.

Based on the preceding criteria, the best platforms for running MySQL at this point are x86 with SuSE Linux using a 2.4 kernel, and ReiserFS (or any similar Linux distribution) and SPARC with Solaris (2.7-9). FreeBSD comes third, but we really hope it will join the top club once the thread library is improved. We also hope that at some point we will be able to include into the top category all other platforms on which MySQL currently compiles and runs okay, but not quite with the same level of stability and performance. This will require some effort on our part in cooperation with the developers of the operating system and library components that MySQL depends on. If you are interested in improving one of those components, are in a position to influence its development, and need more detailed instructions on what MySQL needs to run better, send an email message to the MySQL internals mailing list. See section 1.4.1.1 The MySQL Mailing Lists. 数据挖掘研究院

Please note that the purpose of the preceding comparison is not to say that one operating system is better or worse than another in general. We are talking only about choosing an OS for the specific purpose of running MySQL. With this in mind, the result of this comparison would be different if we considered more factors. In some cases, the reason one OS is better than the other could simply be that we have been able to put more effort into testing and optimizing for a particular platform. We are just stating our observations to help you decide which platform to use for running MySQL. 数据挖掘研究院

2.1.2 Choosing Which MySQL Distribution to Install

When preparing to install MySQL, you should decide which version to use. MySQL development occurs in several release series, and you can pick the one that best fits your needs. After deciding which version to install, you can choose a distribution format. Releases are available in binary or source format.

数据挖掘研究院

2.1.2.1 Choosing Which Version of MySQL to Install

The first decision to make is whether you want to use a production (stable) release or a development release. In the MySQL development process, multiple release series co-exist, each at a different stage of maturity: 数据挖掘研究院

  • MySQL 5.0 is the newest development release series and is under very active development for new features. Alpha releases have been issued to allow more widespread testing.
  • MySQL 4.1 is the current stable (production-quality) release series. New releases are issued for bugfixes. No new features are added that could diminish the code stability.
  • MySQL 4.0 is the previous stable (production-quality) release series. New releases are issued for bugfixes. No new features are added that could diminish the code stability.
  • MySQL 3.23 is the old stable (production-quality) release series. This series is retired, so new releases are issued only to fix critical bugs.

We don"t believe in a complete freeze, as this also leaves out bugfixes and things that ``must be done."" ``Somewhat frozen"" means that we may add small things that ``almost surely will not affect anything that"s already working."" Naturally, relevant bugfixes from an earlier series propagate to later series. 数据挖掘研究院

Normally, if you are beginning to use MySQL for the first time or trying to port it to some system for which there is no binary distribution, we recommend going with the production release series. Currently this is MySQL 4.1. All MySQL releases, even those from development series, are checked with the MySQL benchmarks and an extensive test suite before being issued.

If you are running an old system and want to upgrade, but don"t want to take the chance of having a non-seamless upgrade, you should upgrade to the latest version in the same release series you are using (where only the last part of the version number is newer than yours). We have tried to fix only fatal bugs and make small, relatively safe changes to that version.

If you want to use new features not present in the production release series, you can use a version from a development series. Note that development releases are not as stable as production releases. 数据挖掘研究院

If you want to use the very latest sources containing all current patches and bugfixes, you can use one of our BitKeeper repositories. These are not ``releases"" as such, but are available as previews of the code on which future releases will be based. 数据挖掘研究院

The MySQL naming scheme uses release names that consist of three numbers and a suffix; for example, mysql-4.1.2-alpha. The numbers within the release name are interpreted like this: 数据挖掘研究院

  • The first number (4) is the major version and also describes the file format. All Version 4 releases have the same file format.
  • The second number (1) is the release level. Taken together, the major version and release level constitute the release series number.
  • The third number (2) is the version number within the release series. This is incremented for each new release. Usually you want the latest version for the series you have chosen.

For each minor update, the last number in the version string is incremented. When there are major new features or minor incompatibilities with previous versions, the second number in the version string is incremented. When the file format changes, the first number is increased. 数据挖掘实验室

Release names also include a suffix to indicates the stability level of the release. Releases within a series progress through a set of suffixes to indicate how the stability level improves. The possible suffixes are: 数据挖掘研究院

  • alpha indicates that the release contains some large section of new code that hasn"t been 100% tested. Known bugs (usually there are none) should be documented in the News section. See section D MySQL Change History. There are also new commands and extensions in most alpha releases. Active development that may involve major code changes can occur in an alpha release, but everything will be tested before issuing a release. For this reason, there should be no known bugs in any MySQL release.
  • beta means that all new code has been tested. No major new features that could cause corruption in old code are added. There should be no known bugs. A version changes from alpha to beta when there haven"t been any reported fatal bugs within an alpha version for at least a month and we have no plans to add any features that could make any old command unreliable.
  • gamma is a beta that has been around a while and seems to work fine. Only minor fixes are added. This is what many other companies call a release.
  • If there is no suffix, it means that the version has been run for a while at many different sites with no reports of bugs other than platform-specific bugs. Only critical bugfixes are applied to the release. This is what we call a production (stable) or `General Availability" (GA) release.

MySQL uses a naming scheme that is slightly different from most other products. In general, it"s relatively safe to use any version that has been out for a couple of weeks without being replaced with a new version within the release series. 数据挖掘研究院

All releases of MySQL are run through our standard tests and benchmarks to ensure that they are relatively safe to use. Because the standard tests are extended over time to check for all previously found bugs, the test suite keeps getting better.

数据挖掘研究院

All releases have been tested at least with:

An internal test suite
The `mysql-test" directory contains an extensive set of test cases. We run these tests for virtually every server binary. See section 24.1.2 MySQL Test Suite for more information about this test suite.
The MySQL benchmark suite
This suite runs a range of common queries. It is also a test to see whether the latest batch of optimizations actually made the code faster. See section 7.1.4 The MySQL Benchmark Suite.
The crash-me test
This test tries to determine what features the database supports and what its capabilities and limitations are. See section 7.1.4 The MySQL Benchmark Suite.

Another test is that we use the newest MySQL version in our internal production environment, on at least one machine. We have more than 100GB of data to work with. 数据挖掘研究院

2.1.2.2 Choosing a Distribution Format

After choosing which version of MySQL to install, you should decide whether to use a binary distribution or a source distribution. In most cases, you should probably use a binary distribution, if one exists for your platform. Binary distributions are available in native format for many platforms, such as RPM files for Linux or DMG package installers for Mac OS X. Distributions also are available as Zip archives or compressed tar files.

数据挖掘研究院

Reasons to choose a binary distribution include the following: 数据挖掘研究院

  • Binary distributions generally are easier to install than source distributions.
  • To satisfy different user requirements, we provide two different binary versions: one compiled with the non-transactional storage engines (a small, fast binary), and one configured with the most important extended options like transaction-safe tables. Both versions are compiled from the same source distribution. All native MySQL clients can connect to servers from either MySQL version. The extended MySQL binary distribution is marked with the -max suffix and is configured with the same options as mysqld-max. See section 5.1.2 The mysqld-max Extended MySQL Server. If you want to use the MySQL-Max RPM, you must first install the standard MySQL-server RPM.

Under some circumstances, you probably will be better off installing MySQL from a source distribution:

数据挖掘研究院

  • You want to install MySQL at some explicit location. The standard binary distributions are ``ready to run"" at any place, but you may want to have even more flexibility to place MySQL components where you want.
  • You want to configure mysqld with some extra features that are not included in the standard binary distributions. Here is a list of the most common extra options that you may want to use:
    • --with-innodb (default for MySQL 4.0 and up)
    • --with-berkeley-db (not available on all platforms)
    • --with-raid
    • --with-libwrap
    • --with-named-z-libs (this is done for some of the binaries)
    • --with-debug[=full]
  • You want to configure mysqld without some features that are included in the standard binary distributions. For example, distributions normally are compiled with support for all character sets. If you want a smaller MySQL server, you can recompile it with support for only the character sets you need.
  • You have a special compiler (such as pgcc) or want to use compiler options that are better optimized for your processor. Binary distributions are compiled with options that should work on a variety of processors from the same processor family.
  • You want to use the latest sources from one of the BitKeeper repositories to have access to all current bugfixes. For example, if you have found a bug and reported it to the MySQL development team, the bugfix will be committed to the source repository and you can access it there. The bugfix will not appear in a release until a release actually is issued.
  • You want to read (or modify) the C and C++ code that makes up MySQL. For this purpose, you should get a source distribution, because the source code is always the ultimate manual.
  • Source distributions contain more tests and examples than binary distributions.

2.1.2.3 How and When Updates Are Released

数据挖掘实验室

MySQL is evolving quite rapidly here at MySQL AB and we want to share new developments with other MySQL users. We try to make a release when we have very useful features that others seem to have a need for.

数据挖掘研究院

We also try to help out users who request features that are easy to implement. We take note of what our licensed users want to have, and we especially take note of what our support customers want and try to help them out.

No one has to download a new release. The News section will tell you if the new release has something you really want. See section D MySQL Change History.

数据挖掘研究院

We use the following policy when updating MySQL: 数据挖掘研究院

  • Releases are issued within each series. For each release, the last number in the version is one more than the previous release within the same series.
  • Production (stable) releases are meant to appear about 1-2 times a year. However, if small bugs are found, a release with only bugfixes will be issued.
  • Working releases/bugfixes to old releases are meant to appear about every 4-8 weeks.
  • Binary distributions for some platforms are made by us for major releases. Other people may make binary distributions for other systems, but probably less frequently.
  • We make fixes available as soon as we have identified and corrected small or non-critical but annoying bugs. The fixes are available immediately from our public BitKeeper repositories, and will be included in the next release.
  • If by any chance a fatal bug is found in a release, we will make a new release as soon as possible. (We would like other companies to do this, too!)

2.1.2.4 Release Philosophy--No Known Bugs in Releases

We put a lot of time and effort into making our releases bug-free. To our knowledge, we have not released a single MySQL version with any known ``fatal"" repeatable bugs. (A ``fatal"" bug is something that crashes MySQL under normal usage, produces incorrect answers for normal queries, or has a security problem.) 数据挖掘研究院

We have documented all open problems, bugs, and issues that are dependent on design decisions. See section 1.5.7 Known Errors and Design Deficiencies in MySQL. 数据挖掘研究院

Our aim is to fix everything that is fixable without risk of making a stable MySQL version less stable. In certain cases, this means we can fix an issue in the development versions, but not in the stable (production) version. Naturally, we document such issues so that users are aware of them.

数据挖掘研究院

Here is a description of how our build process works:

  • We monitor bugs from our customer support list, the bugs database at http://bugs.mysql.com/, and the MySQL external mailing lists.
  • All reported bugs for live versions are entered into the bugs database.
  • When we fix a bug, we always try to make a test case for it and include it into our test system to ensure that the bug will never recur without being detected. (About 90% of all fixed bugs have a test case.)
  • We create test cases for all new features we add to MySQL.
  • Before we start to build a new MySQL release, we ensure that all reported repeatable bugs for the MySQL version (3.23.x, 4.0.x, etc) are fixed. If something is impossible to fix (due to some internal design decision in MySQL), we document this in the manual. See section 1.5.7 Known Errors and Design Deficiencies in MySQL.
  • We do a build on all platforms for which we support binaries (15+ platforms) and run our test suite and benchmark suite on all of them.
  • We will not publish a binary for a platform for which the test or benchmark suite fails. If the problem is due to a general error in the source, we fix it and do the build plus tests on all systems again from scratch.
  • The build and test process takes 2-3 days. If we receive a report regarding a fatal bug during this process (for example, one that causes a core dump), we fix the problem and restart the build process.
  • After publishing the binaries on http://dev.mysql.com/, we send out an announcement message to the mysql and announce mailing lists. See section 1.4.1.1 The MySQL Mailing Lists. The announcement message contains a list of all changes to the release and any known problems with the release. The Known Problems section in the release notes has been needed for only a handful of releases.
  • To quickly give our users access to the latest MySQL features, we do a new MySQL release every 4-8 weeks. Source code snapshots are built daily and are available at http://downloads.mysql.com/snapshots.php.
  • If, despite our best efforts, we get any bug reports after the release is done that there was something critically wrong with the build on a specific platform, we will fix it at once and build a new "a" release for that platform. Thanks to our large user base, problems are found quickly.
  • Our track record for making good releases is quite good. In the last 150 releases, we had to do a new build for fewer than 10 releases. In three of these cases, the bug was a faulty glibc library on one of our build machines that took us a long time to track down.

2.1.2.5 MySQL Binaries Compiled by MySQL AB

数据挖掘研究院

As a service of MySQL AB, we provide a set of binary distributions of MySQL that are compiled on systems at our site or on systems where supporters of MySQL kindly have given us access to their machines.

In addition to the binaries provided in platform-specific package formats, we offer binary distributions for a number of platforms in the form of compressed tar files (.tar.gz files). See section 2.2 Standard MySQL Installation Using a Binary Distribution.

数据挖掘研究院

For Windows distributions, see section 2.3 Installing MySQL on Windows. 数据挖掘研究院

These distributions are generated using the script Build-tools/Do-compile, which compiles the source code and creates the binary tar.gz archive using scripts/make_binary_distribution.

数据挖掘研究院

These binaries are configured and built with the following compilers and options. This information can also be obtained by looking at the variables COMP_ENV_INFO and CONFIGURE_LINE inside the script bin/mysqlbug of every binary tar file distribution.

The following binaries are built on MySQL AB development systems:

数据挖掘研究院

Linux 2.4.xx x86 with gcc 2.95.3:
CFLAGS="-O2 -mcpu=pentiumpro" CXX=gcc CXXFLAGS="-O2 -mcpu=pentiumpro -felide-constructors" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --disable-shared --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static
Linux 2.4.x x86 with icc (Intel C++ Compiler 8.0):
CC=icc CXX=icc CFLAGS="-O3 -unroll2 -ip -mp -no-gcc -restrict" CXXFLAGS="-O3 -unroll2 -ip -mp -no-gcc -restrict" ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --libexecdir=/usr/local/mysql/bin --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --disable-shared --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --with-embedded-server --with-innodb
Linux 2.4.xx Intel Itanium 2 with ecc (Intel C++ Itanium Compiler 7.0):
CC=ecc CFLAGS="-O2 -tpp2 -ip -nolib_inline" CXX=ecc CXXFLAGS="-O2 -tpp2 -ip -nolib_inline" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile
Linux 2.4.xx Intel Itanium with ecc (Intel C++ Itanium Compiler 7.0):
CC=ecc CFLAGS=-tpp1 CXX=ecc CXXFLAGS=-tpp1 ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile
Linux 2.4.xx alpha with ccc (Compaq C V6.2-505 / Compaq C++ V6.3-006):
CC=ccc CFLAGS="-fast -arch generic" CXX=cxx CXXFLAGS="-fast -arch generic -noexceptions -nortti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-mysqld-ldflags=-non_shared --with-client-ldflags=-non_shared --disable-shared
Linux 2.x.xx ppc with gcc 2.95.4:
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --libexecdir=/usr/local/mysql/bin --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared --with-embedded-server --with-innodb
Linux 2.4.xx s390 with gcc 2.95.3:
CFLAGS="-O2" CXX=gcc CXXFLAGS="-O2 -felide-constructors" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static
Linux 2.4.xx x86_64 (AMD64) with gcc 3.2.1:
CXX=gcc ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared
Sun Solaris 8 x86 with gcc 3.2.3:
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --libexecdir=/usr/local/mysql/bin --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared --with-innodb
Sun Solaris 8 SPARC with gcc 3.2:
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --with-named-z-libs=no --with-named-curses-libs=-lcurses --disable-shared
Sun Solaris 8 SPARC 64-bit with gcc 3.2:
CC=gcc CFLAGS="-O3 -m64 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -m64 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-named-z-libs=no --with-named-curses-libs=-lcurses --disable-shared
Sun Solaris 9 SPARC with gcc 2.95.3:
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --with-named-curses-libs=-lcurses --disable-shared
Sun Solaris 9 SPARC with cc-5.0 (Sun Forte 5.0):
CC=cc-5.0 CXX=CC ASFLAGS="-xarch=v9" CFLAGS="-Xa -xstrconst -mt -D_FORTEC_ -xarch=v9" CXXFLAGS="-noex -mt -D_FORTEC_ -xarch=v9" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --with-named-z-libs=no --enable-thread-safe-client --disable-shared
IBM AIX 4.3.2 ppc with gcc 3.2.3:
CFLAGS="-O2 -mcpu=powerpc -Wa,-many " CXX=gcc CXXFLAGS="-O2 -mcpu=powerpc -Wa,-many -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-named-z-libs=no --disable-shared
IBM AIX 4.3.3 ppc with xlC_r (IBM Visual Age C/C++ 6.0):
CC=xlc_r CFLAGS="-ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192" CXX=xlC_r CXXFLAGS ="-ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192" ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --libexecdir=/usr/local/mysql/bin --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-named-z-libs=no --disable-shared --with-innodb
IBM AIX 5.1.0 ppc with gcc 3.3:
CFLAGS="-O2 -mcpu=powerpc -Wa,-many" CXX=gcc CXXFLAGS="-O2 -mcpu=powerpc -Wa,-many -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-named-z-libs=no --disable-shared
IBM AIX 5.2.0 ppc with xlC_r (IBM Visual Age C/C++ 6.0):
CC=xlc_r CFLAGS="-ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192" CXX=xlC_r CXXFLAGS="-ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192" ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --libexecdir=/usr/local/mysql/bin --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-named-z-libs=no --disable-shared --with-embedded-server --with-innodb
HP-UX 10.20 pa-risc1.1 with gcc 3.1:
CFLAGS="-DHPUX -I/opt/dce/include -O3 -fPIC" CXX=gcc CXXFLAGS="-DHPUX -I/opt/dce /include -felide-constructors -fno-exceptions -fno-rtti -O3 -fPIC" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-pthread --with-named-thread-libs=-ldce --with-lib-ccflags=-fPIC --disable-shared
HP-UX 11.00 pa-risc with aCC (HP ANSI C++ B3910B A.03.50):
CC=cc CXX=aCC CFLAGS=+DAportable CXXFLAGS=+DAportable ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --libexecdir=/usr/local/mysql/bin --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared --with-embedded-server --with-innodb
HP-UX 11.11 pa-risc2.0 64bit with aCC (HP ANSI C++ B3910B A.03.33):
CC=cc CXX=aCC CFLAGS=+DD64 CXXFLAGS=+DD64 ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared
HP-UX 11.11 pa-risc2.0 32bit with aCC (HP ANSI C++ B3910B A.03.33):
CC=cc CXX=aCC CFLAGS="+DAportable" CXXFLAGS="+DAportable" ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --libexecdir=/usr/local/mysql/bin --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared --with-innodb
HP-UX 11.22 ia64 64bit with aCC (HP aC++/ANSI C B3910B A.05.50):
CC=cc CXX=aCC CFLAGS="+DD64 +DSitanium2" CXXFLAGS="+DD64 +DSitanium2" ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --libexecdir=/usr/local/mysql/bin --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared --with-embedded-server --with-innodb
Apple Mac OS X 10.2 powerpc with gcc 3.1:
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared
FreeBSD 4.7 i386 with gcc 2.95.4:
CFLAGS=-DHAVE_BROKEN_REALPATH ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --with-named-z-libs=not-used --disable-shared
FreeBSD 4.7 i386 using LinuxThreads with gcc 2.95.4:
CFLAGS="-DHAVE_BROKEN_REALPATH -D__USE_UNIX98 -D_REENTRANT -D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads" CXXFLAGS="-DHAVE_BROKEN_REALPATH -D__USE_UNIX98 -D_REENTRANT -D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads" ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --libexecdir=/usr/local/mysql/bin --enable-thread-safe-client --enable-local-infile --enable-assembler --with-named-thread-libs="-DHAVE_GLIBC2_STYLE_GETHOSTBYNAME_R -D_THREAD_SAFE -I /usr/local/include/pthread/linuxthreads -L/usr/local/lib -llthread -llgcc_r" --disable-shared --with-embedded-server --with-innodb
QNX Neutrino 6.2.1 i386 with gcc 2.95.3qnx-nto 20010315:
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared

The following binaries are built on third-party systems kindly provided to MySQL AB by other users. These are provided only as a courtesy; MySQL AB does not have full control over these systems, so we can provide only limited support for the binaries built on them.

SCO Unix 3.2v5.0.6 i386 with gcc 2.95.3:
CFLAGS="-O3 -mpentium" LDFLAGS=-static CXX=gcc CXXFLAGS="-O3 -mpentium -felide-constructors" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-named-z-libs=no --enable-thread-safe-client --disable-shared
SCO OpenUnix 8.0.0 i386 with CC 3.2:
CC=cc CFLAGS="-O" CXX=CC ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-named-z-libs=no --enable-thread-safe-client --disable-shared
Compaq Tru64 OSF/1 V5.1 732 alpha with cc/cxx (Compaq C V6.3-029i / DIGITAL C++ V6.1-027):
CC="cc -pthread" CFLAGS="-O4 -ansi_alias -ansi_args -fast -inline speed -speculate all" CXX="cxx -pthread" CXXFLAGS="-O4 -ansi_alias -fast -inline speed -speculate all -noexceptions -nortti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-named-thread-libs="-lpthread -lmach -lexc -lc" --disable-shared --with-mysqld-ldflags=-all-static
SGI Irix 6.5 IP32 with gcc 3.0.1:
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared
FreeBSD/sparc64 5.0 with gcc 3.2.1:
CFLAGS=-DHAVE_BROKEN_REALPATH ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --libexecdir=/usr/local/mysql/bin --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared --with-innodb

The following compile options have been used for binary packages that MySQL AB provided in the past. These binaries no longer are being updated, but the compile options are listed here for reference purposes. 数据挖掘研究院

Linux 2.2.xx SPARC with egcs 1.1.2:
CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --disable-shared
Linux 2.2.x with x686 with gcc 2.95.2:
CFLAGS="-O3 -mpentiumpro" CXX=gcc CXXFLAGS="-O3 -mpentiumpro -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld-ldflags=-all-static --disable-shared --with-extra-charsets=complex
SunOS 4.1.4 2 sun4c with gcc 2.7.2.1:
CC=gcc CXX=gcc CXXFLAGS="-O3 -felide-constructors" ./configure --prefix=/usr/local/mysql --disable-shared --with-extra-charsets=complex --enable-assembler
SunOS 5.5.1 (and above) sun4u with egcs 1.0.3a or 2.90.27 or
gcc 2.95.2 and newer: CC=gcc CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-low-memory --with-extra-charsets=complex --enable-assembler
SunOS 5.6 i86pc with gcc 2.8.1:
CC=gcc CXX=gcc CXXFLAGS=-O3 ./configure --prefix=/usr/local/mysql --with-low-memory --with-extra-charsets=complex
BSDI BSD/OS 3.1 i386 with gcc 2.7.2.1:
CC=gcc CXX=gcc CXXFLAGS=-O ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex
BSDI BSD/OS 2.1 i386 with gcc 2.7.2:
CC=gcc CXX=gcc CXXFLAGS=-O3 ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex
AIX 4.2 with gcc 2.7.2.2:
CC=gcc CXX=gcc CXXFLAGS=-O3 ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex

Anyone who has more optimal options for any of the preceding configurations listed can always mail them to the MySQL internals mailing list. See section 1.4.1.1 The MySQL Mailing Lists.

数据挖掘研究院

RPM distributions prior to MySQL 3.22 are user-contributed. Beginning with MySQL 3.22, RPM distributions are generated by MySQL AB. 数据挖掘实验室

If you want to compile a debug version of MySQL, you should add --with-debug or --with-debug=full to the preceding configure commands and remove any -fomit-frame-pointer options. 数据挖掘研究院

2.1.3 How to Get MySQL

Check the MySQL downloads page (http://dev.mysql.com/downloads/) for information about the current version and for downloading instructions. For a complete up-to-date list of MySQL download mirror sites, see http://dev.mysql.com/downloads/mirrors.html. There you will also find information about becoming a MySQL mirror site and how to report a bad or out-of-date mirror. 数据挖掘研究院

Our main mirror is located at http://mirrors.sunsite.dk/mysql/.

2.1.4 Verifying Package Integrity Using MD5 Checksums or GnuPG

After you have downloaded the MySQL package that suits your needs and before you attempt to install it, you should make sure that it is intact and has not been tampered with. MySQL AB offers three means of integrity checking:

数据挖掘研究院

  • MD5 checksums
  • Cryptographic signatures using GnuPG, the GNU Privacy Guard
  • For RPM packages, the built-in RPM integrity verification mechanism

The following sections describe how to use these methods.

If you notice that the MD5 checksum or GPG signatures do not match, first try to download the respective package one more time, perhaps from another mirror site. If you repeatedly cannot successfully verify the integrity of the package, please notify us about such incidents, including the full package name and the download site you have been using, at webmaster@mysql.com or build@mysql.com. Do not report downloading problems using the bug-reporting system. 数据挖掘研究院

2.1.4.1 Verifying the MD5 Checksum

After you have downloaded a MySQL package, you should make sure that its MD5 checksum matches the one provided on the MySQL download pages. Each package has an individual checksum that you can verify with the following command, where package_name is the name of the package you downloaded: 数据挖掘研究院

shell> md5sum package_name
 数据挖掘研究院 

Example:

shell> md5sum mysql-standard-4.0.17-pc-linux-i686.tar.gz
60f5fe969d61c8f82e4f7f62657e1f06  mysql-standard-4.0.17-pc-linux-i686.tar.gz
 数据挖掘实验室 

You should verify that the resulting checksum (the string of hexadecimal digits) matches the one displayed on the download page immediately below the respective package.

数据挖掘实验室

Note that not all operating systems support the md5sum command. On some, it is simply called md5 and others do not ship it at all. On Linux, it is part of the GNU Text Utilities package, which is available for a wide range of platforms. You can download the source code from http://www.gnu.org/software/textutils/ as well. If you have OpenSSL installed, you can also use the command openssl md5 package_name instead. A DOS/Windows implementation of the md5 command is available from http://www.fourmilab.ch/md5/.

2.1.4.2 Signature Checking Using GnuPG

Another method of verifying the integrity and authenticity of a package is to use cryptographic signatures. This is more reliable than using MD5 checksums, but requires more work.

Beginning with MySQL 4.0.10 (February 2003), MySQL AB started signing downloadable packages with GnuPG (GNU Privacy Guard). GnuPG is an Open Source alternative to the very well-known Pretty Good Privacy (PGP) by Phil Zimmermann. See http://www.gnupg.org/ for more information about GnuPG and how to obtain and install it on your system. Most Linux distributions already ship with GnuPG installed by default. For more information about OpenPGP, see http://www.openpgp.org/. 数据挖掘研究院

To verify the signature for a specific package, you first need to obtain a copy of MySQL AB"s public GPG build key. You can download the key from http://www.keyserver.net/. The key that you want to obtain is named build@mysql.com. Alternatively, you can cut and paste the key directly from the following text:

Key ID:
pub  1024D/5072E1F5 2003-02-03
     MySQL Package signing key (www.mysql.com) <build@mysql.com>
Fingerprint: A4A9 4068 76FC BD3C 4567  70C8 8C71 8D3B 5072 E1F5

Public Key (ASCII-armored):

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

mQGiBD4+owwRBAC14GIfUfCyEDSIePvEW3SAFUdJBtoQHH/nJKZyQT7h9bPlUWC3
RODjQReyCITRrdwyrKUGku2FmeVGwn2u2WmDMNABLnpprWPkBdCk96+OmSLN9brZ
fw2vOUgCmYv2hW0hyDHuvYlQA/BThQoADgj8AW6/0Lo7V1W9/8VuHP0gQwCgvzV3
BqOxRznNCRCRxAuAuVztHRcEAJooQK1+iSiunZMYD1WufeXfshc57S/+yeJkegNW
hxwR9pRWVArNYJdDRT+rf2RUe3vpquKNQU/hnEIUHJRQqYHo8gTxvxXNQc7fJYLV
K2HtkrPbP72vwsEKMYhhr0eKCbtLGfls9krjJ6sBgACyP/Vb7hiPwxh6rDZ7ITnE
kYpXBACmWpP8NJTkamEnPCia2ZoOHODANwpUkP43I7jsDmgtobZX9qnrAXw+uNDI
QJEXM6FSbi0LLtZciNlYsafwAPEOMDKpMqAK6IyisNtPvaLd8lH0bPAnWqcyefep
rv0sxxqUEMcM3o7wwgfN83POkDasDbs3pjwPhxvhz6//62zQJ7Q7TXlTUUwgUGFj
a2FnZSBzaWduaW5nIGtleSAod3d3Lm15c3FsLmNvbSkgPGJ1aWxkQG15c3FsLmNv
bT6IXQQTEQIAHQUCPj6jDAUJCWYBgAULBwoDBAMVAwIDFgIBAheAAAoJEIxxjTtQ
cuH1cY4AnilUwTXn8MatQOiG0a/bPxrvK/gCAJ4oinSNZRYTnblChwFaazt7PF3q
zIhMBBMRAgAMBQI+PqPRBYMJZgC7AAoJEElQ4SqycpHyJOEAn1mxHijft00bKXvu
cSo/pECUmppiAJ41M9MRVj5VcdH/KN/KjRtW6tHFPYhMBBMRAgAMBQI+QoIDBYMJ
YiKJAAoJELb1zU3GuiQ/lpEAoIhpp6BozKI8p6eaabzF5MlJH58pAKCu/ROofK8J
Eg2aLos+5zEYrB/LsrkCDQQ+PqMdEAgA7+GJfxbMdY4wslPnjH9rF4N2qfWsEN/l
xaZoJYc3a6M02WCnHl6ahT2/tBK2w1QI4YFteR47gCvtgb6O1JHffOo2HfLmRDRi
Rjd1DTCHqeyX7CHhcghj/dNRlW2Z0l5QFEcmV9U0Vhp3aFfWC4Ujfs3LU+hkAWzE
7zaD5cH9J7yv/6xuZVw411x0h4UqsTcWMu0iM1BzELqX1DY7LwoPEb/O9Rkbf4fm
Le11EzIaCa4PqARXQZc4dhSinMt6K3X4BrRsKTfozBu74F47D8Ilbf5vSYHbuE5p
/1oIDznkg/p8kW+3FxuWrycciqFTcNz215yyX39LXFnlLzKUb/F5GwADBQf+Lwqq
a8CGrRfsOAJxim63CHfty5mUc5rUSnTslGYEIOCR1BeQauyPZbPDsDD9MZ1ZaSaf
anFvwFG6Llx9xkU7tzq+vKLoWkm4u5xf3vn55VjnSd1aQ9eQnUcXiL4cnBGoTbOW
I39EcyzgslzBdC++MPjcQTcA7p6JUVsP6oAB3FQWg54tuUo0Ec8bsM8b3Ev42Lmu
QT5NdKHGwHsXTPtl0klk4bQk4OajHsiy1BMahpT27jWjJlMiJc+IWJ0mghkKHt92
6s/ymfdf5HkdQ1cyvsz5tryVI3Fx78XeSYfQvuuwqp2H139pXGEkg0n6KdUOetdZ
Whe70YGNPw1yjWJT1IhMBBgRAgAMBQI+PqMdBQkJZgGAAAoJEIxxjTtQcuH17p4A
n3r1QpVC9yhnW2cSAjq+kr72GX0eAJ4295kl6NxYEuFApmr1+0uUq/SlsQ==
=YJkx
-----END PGP PUBLIC KEY BLOCK-----
 数据挖掘研究院 

You can import the build key into your personal public GPG keyring by using gpg --import. For example, if you save the key in a file named `mysql_pubkey.asc", the import command looks like this:

数据挖掘研究院

shell> gpg --import mysql_pubkey.asc
 

数据挖掘研究院

See the GPG documentation for more information on how to work with public keys. 数据挖掘研究院

After you have downloaded and imported the public build key, download your desired MySQL package and the corresponding signature, which also is available from the download page. The signature file has the same name as the distribution file with an `.asc" extension. For example:

Distribution file mysql-standard-4.0.17-pc-linux-i686.tar.gz
Signature file mysql-standard-4.0.17-pc-linux-i686.tar.gz.asc

Make sure that both files are stored in the same directory and then run the following command to verify the signature for the distribution file:

数据挖掘研究院

shell> gpg --verify package_name.asc
 数据挖掘研究院 

Example: 数据挖掘研究院

shell> gpg --verify mysql-standard-4.0.17-pc-linux-i686.tar.gz.asc
gpg: Warning: using insecure memory!
gpg: Signature made Mon 03 Feb 2003 08:50:39 PM MET
using DSA key ID 5072E1F5
gpg: Good signature from
     "MySQL Package signing key (www.mysql.com) <build@mysql.com>"
 数据挖掘研究院 

The Good signature message indicates that everything is all right. You can ignore the insecure memory warning.

2.1.4.3 Signature Checking Using RPM

For RPM packages, there is no separate signature. RPM packages have a built-in GPG signature and MD5 checksum. You can verify a package by running the following command: 数据挖掘研究院

shell> rpm --checksig package_name.rpm
 

数据挖掘研究院

Example:

shell> rpm --checksig MySQL-server-4.0.10-0.i386.rpm
MySQL-server-4.0.10-0.i386.rpm: md5 gpg OK
 数据挖掘研究院 

Note: If you are using RPM 4.1 and it complains about (GPG) NOT OK (MISSING KEYS: GPG#5072e1f5), even though you have imported the 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 your personal GPG keyring (or GPG itself). Rather, it maintains its own keyring because it is a system-wide application and a user"s GPG public keyring is a user-specific file. To import the MySQL public key into the RPM keyring, first obtain the key as described in the previous section. Then use rpm --import to import the key. For example, if you have the public key stored in a file named `mysql_pubkey.asc", import it using this command: 数据挖掘研究院

shell> rpm --import mysql_pubkey.asc
 数据挖掘研究院 

If you need to obtain the MySQL public key, see section 2.1.4.2 Signature Checking Using GnuPG. 数据挖掘研究院

2.1.5 Installation Layouts

数据挖掘研究院

This section describes the default layout of the directories created by installing binary or source distributions provided by MySQL AB. If you install a distribution provided by another vendor, some other layout might be used. 数据挖掘研究院

On Windows, the default installation directory is `C:mysql". With MySQL version 4.1.5 and higher, this has changed to `C:Program FilesMySQLMySQL Server 4.1", where 4.1 will be the major version of the installation. The folder has the following subdirectories:

数据挖掘研究院

Directory Contents of Directory
`bin" Client programs and the mysqld server
`data" Log files, databases
`Docs" Documentation
`examples" Example programs and scripts
`include" Include (header) files
`lib" Libraries
`scripts" Utility scripts
`share" Error message files

Installations created from Linux RPM distributions result in files under the following system directories: 数据挖掘研究院

Directory Contents of Directory
`/usr/bin" Client programs and scripts
`/usr/sbin" The mysqld server
`/var/lib/mysql" Log files, databases
`/usr/share/doc/packages" Documentation
`/usr/include/mysql" Include (header) files
`/usr/lib/mysql" Libraries
`/usr/share/mysql" Error message and character set files
`/usr/share/sql-bench" Benchmarks

On Unix, a tar file binary distribution is installed by unpacking it at the installation location you choose (typically `/usr/local/mysql") and creates the following directories in that location:

Directory Contents of Directory
`bin" Client programs and the mysqld server
`data" Log files, databases
`docs" Documentation, ChangeLog
`include" Include (header) files
`lib" Libraries
`scripts" mysql_install_db
`share/mysql" Error message files
`sql-bench" Benchmarks

A source distribution is installed after you configure and compile it. By default, the installation step installs files under `/usr/local", in the following subdirectories:

Directory Contents of Directory
`bin" Client programs and scripts
`include/mysql" Include (header) files
`info" Documentation in Info format
`lib/mysql" Libraries
`libexec" The mysqld server
`share/mysql" Error message files
`sql-bench" Benchmarks and crash-me test
`var" Databases and log files

Within an installation directory, the layout of a source installation differs from that of a binary installation in the following ways: 数据挖掘研究院

  • The mysqld server is installed in the `libexec" directory rather than in the `bin" directory.
  • The data directory is `var" rather than `data".
  • mysql_install_db is installed in the `bin" directory rather than in the `scripts" directory.
  • The header file and library directories are `include/mysql" and `lib/mysql" rather than `include" and `lib".

You can create your own binary installation from a compiled source distribution by executing the `scripts/make_binary_distribution" script from the top directory of the source distribution. 数据挖掘研究院

2.2 Standard MySQL Installation Using a Binary Distribution

The next several sections cover the installation of MySQL on platforms where we offer packages using the native packaging format of the respective platform. (This is also known as performing a ``binary install."") However, binary distributions of MySQL are available for many other platforms as well. See section 2.7 Installing MySQL on Other Unix-Like Systems for generic installation instructions for these packages that apply to all platforms. 数据挖掘实验室

See section 2.1 General Installation Issues for more information on what other binary distributions are available and how to obtain them. 数据挖掘研究院

2.3 Installing MySQL on Windows

A native Windows version of MySQL has been available from MySQL AB since version 3.21 and has grown in popularity until it now represents a sizable percentage of the daily downloads of MySQL. This section describes the process for installing MySQL on Windows.

With the release of MySQL 4.1.5, MySQL AB has introduced a new installer for the Windows version of MySQL, combined with a new GUI Configuration Wizard. This combination automatically installs MySQL, creates an option file, starts the server, and secures the default user accounts.

If you have already installed a version of MySQL prior to version 4.1.5, you must perform the following steps:

  1. Obtain and install the distribution.
  2. Set up an option file if necessary.
  3. Select the server that you want to use.
  4. Start the server.
  5. Assign passwords to the initial MySQL accounts.

This process also must be followed with newer MySQL installations where the installation package does not include an installer.

MySQL for Windows is available in two distribution formats: 数据挖掘研究院

  • The binary distribution contains a setup program that installs everything you need so that you can start the server immediately.
  • The source distribution contains all the code and support files for building the executables using the VC++ 6.0 compiler.

Generally speaking, you should use the binary distribution. It"s simpler, and you need no additional tools to get MySQL up and running. 数据挖掘研究院

This section describes how to install MySQL on Windows using a binary distribution. To install using a source distribution, see section 2.8.6 Installing MySQL from Source on Windows. 数据挖掘研究院

2.3.1 Windows System Requirements

To run MySQL on Windows, you need the following: 数据挖掘研究院

  • A 32-bit Windows operating system such as 9x, Me, NT, 2000, XP, or Windows Server 2003. A Windows NT based operating system (NT, 2000, XP, 2003) permits you to run the MySQL server as a service. The use of a Windows NT based operating system is strongly recommended. See section 2.3.12 Starting MySQL as a Windows Service.
  • TCP/IP protocol support.
  • A copy of the MySQL binary distribution for Windows, which can be downloaded from http://dev.mysql.com/downloads/. See section 2.1.3 How to Get MySQL. Note: If you download the distribution via FTP, we recommend the use of an adequate FTP client with a resume feature to avoid corruption of files during the download process.
  • A tool that can read `.zip" files, to unpack the distribution file.
  • Enough space on the hard drive to unpack, install, and create the databases in accordance with your requirements (generally a minimum of 200 megabytes is recommended.)

You may also have the following optional requirements:

  • If you plan to connect to the MySQL server via ODBC, you also need a Connector/ODBC driver. See section 22.1 MySQL ODBC Support.
  • If you need tables with a size larger than 4GB, install MySQL on an NTFS or newer filesystem. Don"t forget to use MAX_ROWS and AVG_ROW_LENGTH when you create tables. See section 13.2.6 CREATE TABLE Syntax.

2.3.2 Choosing An Installation Package

Starting with MySQL version 4.1.5, there are three install packages to choose from when installing MySQL on Windows. The Packages are as follows: 数据挖掘研究院

  • The Essentials Package: This package has a filename similar to `mysql-essential-4.1.9-win32.msi" and contains the minimum files needed to install MySQL on Windows, including the Configuration Wizard. This package does not include optional components such as the embedded server and benchmark suite.
  • The Complete Package: This package has a filename similar to `mysql-4.1.9-win32.zip" and contains all files needed for a complete Windows installation, including the Configuration Wizard. This package includes optional components such as the embedded server and benchmark suite.
  • The Noinstall Archive: This package has a filename similar to `mysql-noinstall-4.1.9-win32.zip" and contains all the files found in the Complete install package, with the exception of the Configuration Wizard. This package does not include an automated installer, and must be manually installed and configured.

The Essentials package is recommended for most users.

Your choice of install package affects the installation process you must follow. If you choose to install either the Essentials or Complete install packages, see section 2.3.3 Installing MySQL with the Automated Installer. If you choose to install MySQL from the Noinstall archive, see section 2.3.6 Installing MySQL from a noinstall Zip Archive. 数据挖掘实验室

2.3.3 Installing MySQL with the Automated Installer

Starting with MySQL 4.1.5, users can use the new MySQL Installation Wizard and MySQL Configuration Wizard to install MySQL on Windows. The MySQL Installation Wizard and MySQL Configuration Wizard are designed to install and configure MySQL in such a way that new users can immediately get started using MySQL.

The MySQL Installation Wizard and MySQL Configuration Wizard are available in the Essentials and Complete install packages, and are recommended for most standard MySQL installations. Exceptions include users who need to install multiple instances of MySQL on a single server and advanced users who want complete control of server configuration.

数据挖掘实验室

If you are installing a version of MySQL prior to MySQL 4.1.5, please follow the instructions for installing MySQL from the Noinstall installation package. See section 2.3.6 Installing MySQL from a noinstall Zip Archive. 数据挖掘实验室

2.3.4 Using the MySQL Installation Wizard

2.3.4.1 Introduction

MySQL Installation Wizard is a new installer for the MySQL server that uses the latest installer technologies for Microsoft Windows. The MySQL Installation Wizard, in combination with the MySQL Configuration Wizard, allows a user to install and configure a MySQL server that is ready for use immediately after installation. 数据挖掘研究院

The MySQL Installation Wizard is the standard installer for all MySQL server distributions, version 4.1.5 and higher. Users of previous versions of MySQL need to manually shut down and remove their existing MySQL installations before installing MySQL with the MySQL Installation Wizard. See section 2.3.4.7 Upgrading MySQL for more information on upgrading from a previous version.

Microsoft has included an improved version of their Microsoft Windows Installer (MSI) in the recent versions of Windows. Using the MSI has become the de-facto standard for application installations on Windows 2000, Windows XP, and Windows Server 2003. The MySQL Installation Wizard makes use of this technology to provide a smoother and more flexible installation progress.

数据挖掘实验室

The Microsoft Windows Installer Engine was updated with the release of Windows XP; those using a previous version of Windows can reference this Microsoft Knowledge Base article for information on upgrading to the latest version of the Windows Installer Engine.

数据挖掘实验室

Further, Microsoft has introduced the WiX (Windows Installer XML) tool set recently. It is the first highly acknowledged Open Source project from Microsoft. We switched to WiX because it is an Open Source project and it allows us to handle the complete Windows installation process in a flexible way with scripts. 数据挖掘研究院

Improving the MySQL Installation Wizard depends on the support and feedback of users like you. If you find that the MySQL Installation Wizard is lacking some feature important to you, or if you discover a bug, please use our MySQL Bug System to request features or report problems. 数据挖掘研究院

2.3.4.2 Downloading and Starting the MySQL Installation Wizard

The MySQL server install packages can be downloaded from http://dev.mysql.com/downloads/. If the package you download is contained within a Zip archive, you need to extract the archive first.

The process for starting the wizard depends on the contents of the install package you download. If there is a setup.exe file present, double-click it to start the install process. If there is a .msi file present, double-click it to start the install process. 数据挖掘实验室

2.3.4.3 Choosing an Install Type

There are up three installation types available: Typical, Complete, and Custom.

数据挖掘实验室

The Typical installation type installs the MySQL server, the mysql command-line client, and the command-line utilities. The command-line clients and utilities include mysqldump, myisamchk, and several other tools to help you manage the MySQL server.

数据挖掘研究院

The Complete installation type installs all components included in the installation package. The full installation package includes components such as the embedded server library, the benchmark suite, support scripts, and documentation. 数据挖掘实验室

The Custom installation type gives you complete control over which packages you wish to install and the installation path that will be used. See section 2.3.4.4 The Custom Install Dialog for more information on performing a custom install. 数据挖掘实验室

If you choose the Typical or Complete installation types and click the Next button, you advance to the confirmation screen to confirm your choices and begin the installation. If you choose the Custom installation type and click the Next button, you advance to the custom install dialog, described in section 2.3.4.4 The Custom Install Dialog

2.3.4.4 The Custom Install Dialog

If you wish to change the installation path or the specific components that are installed by the MySQL Installation Wizard, you should choose the Custom installation type. 数据挖掘研究院

All available components are listed in a tree view on the left side of the custom install dialog. Components that will not be installed have a red X icon, components that will be installed have a gray icon. To change whether a component is installed, click on the component"s icon and choose an new option from the drop-down list that appears.

You can change the default installation path by clicking the Change... button to the right of the displayed installation path.

数据挖掘研究院

After choosing your install components and installation path, click the Next button to advance to the confirmation dialog. 数据挖掘研究院

2.3.4.5 The Confirmation Dialog

Once you choose an installation type and optionally choose your installation components, you advance to the confirmation dialog. Your installation type and installation path are displayed for you to review. 数据挖掘实验室

To install MySQL if you are satisfied with your settings, click the Install button. To change your settings, click the Back button. To exit the MySQL Installation Wizard without installing MySQL, click the Cancel button. 数据挖掘实验室

After installation is complete, you will be given the option of registering with the MySQL web site. Registration will give you access to post in the MySQL forums at forums.mysql.com, along with the ability to report bugs at bugs.mysql.com and subscribe to the newsletter. The final screen of the installer provides a summary of the installation and gives you the option to launch the MySQL Configuration Wizard, which you can use to create a configuration file, install the MySQL service, and configure security.

数据挖掘研究院

2.3.4.6 Changes Made by MySQL Installation Wizard

Once you click the Install button, the MySQL Installation Wizard begins the installation process and makes certain changes to your system which are described in the sections that follow.

Changes to the Registry

数据挖掘研究院

The MySQL Installation Wizard creates one Windows registry key in a typical install situation, located in HKEY_LOCAL_MACHINESOFTWAREMySQL AB.

The MySQL Installation Wizard creates a key named after the major version of the server that is being installed, such as MySQL Server 4.1. It contains two string values, Location and Version. The Location string contains the path to the installation directory. In a default installation it contains C:Program FilesMySQLMySQL Server 4.1. The Version string contains the release number. For example, for an installation of MySQL Server 4.1.5 the key contains a value of 4.1.5. 数据挖掘研究院

These registry keys are used to help external tools identify the installed location of the MySQL server, preventing a complete scan of the hard-disk to determine the installation path of the MySQL server. The registry keys are not required to run the server and when using the noinstall Zip archive the registry keys are not created. 数据挖掘研究院

Changes to the Start Menu 数据挖掘研究院

The MySQL Installation Wizard creates a new entry in the Windows Start menu under a common MySQL menu heading named after the major version of MySQL that you have installed. For example, if you install MySQL 4.1, the MySQL Installation Wizard creates a MySQL Server 4.1 section in the start menu. 数据挖掘研究院

The following entries are created within the new Start menu section: 数据挖掘研究院

  • MySQL Command Line Client: This is a shortcut to the mysql command-line client and is configured to connect as the root user. The shortcut prompts for a root user password when connecting.
  • MySQL Server Instance Config Wizard: This is a shortcut to the MySQL Configuration Wizard. Use this shortcut to configure a newly installed server, or to re-configure an existing server.
  • MySQL Documentation: This is a link to the MySQL server documentation that is stored locally in the MySQL server installation directory. This option is not available when the MySQL server is installed from the essential installation package.

Changes to the File System

数据挖掘研究院

The MySQL Installation Wizard by default installs the MySQL server to C:Program FilesMySQLMySQL Server 4.1, where Program Files is the default location for applications in your system, and 4.1 is the major version of your MySQL server. This is the new recommended location for the MySQL server, replacing the previous default location of `c:mysql". 数据挖掘研究院

By default, all MySQL applications are stored in a common directory at C:Program FilesMySQL, where Program Files is the default location for applications in your Windows installation. A typical MySQL installation on a developer machine may look like this:

C:Program FilesMySQLMySQL Server 4.1
C:Program FilesMySQLMySQL Server 5.0
C:Program FilesMySQLMySQL Administrator 1.0
C:Program FilesMySQLMySQL Query Browser 1.0
  

This approach makes it easier to manage and maintain all MySQL applications installed on a particular system. 数据挖掘研究院

2.3.4.7 Upgrading MySQL

From MySQL version 4.1.5, the new MySQL Installation Wizard can perform server upgrades automatically using the upgrade capabilities of MSI. That means you do not need to remove a previous installation manually before installing a new release. The installer automatically shuts down and removes the previous MySQL service before installing the new version.

数据挖掘研究院

Automatic upgrades are only available when upgrading between installations that have the same major and minor version numbers. For example, you can upgrade automatically from MySQL 4.1.5 to MySQL 4.1.6, but not from MySQL 4.1 to MySQL 5.0. 数据挖掘研究院

If you are upgrading MySQL version 4.1.4 or earlier to version 4.1.5 or later, you must first manually shut down and remove the older installation before upgrading. Be sure to back up your databases before performing such an upgrade, so that you can restore the databases after the upgrade is completed. It is always recommended that you back up your data before performing any upgrades. 数据挖掘实验室

See section 2.3.15 Upgrading MySQL on Windows. 数据挖掘研究院

2.3.5 Using the Configuration Wizard

2.3.5.1 Introduction

The MySQL Configuration Wizard helps automate the processs of configuring your server under Windows. The MySQL Configuration Wizard creates a custom `my.ini" file by asking you a series of questions and then applying your responses to a template to generate a `my.ini" file that is tuned to your installation. 数据挖掘研究院

The MySQL Configuration Wizard is included with the MySQL server starting with MySQL version 4.1.5, but is designed to work with MySQL servers versions 4.0 and higher. The MySQL Configuration Wizard is currently available for Windows users only. 数据挖掘研究院

MySQL Configuration Wizard is to a large extent the result of feedback MySQL AB has received from many users over a period of several years. However, if you find it"s lacking some feature important to you, or if you discover a bug, please use our MySQL Bug System to request features or report problems. 数据挖掘研究院

2.3.5.2 Starting the MySQL Configuration Wizard

The MySQL Configuration Wizard is typically launched from the MySQL Installation Wizard, as the MySQL Installation Wizard exits. You can also launch the MySQL Configuration Wizard by clicking the MySQL Server Instance Config Wizard entry in the MySQL section of the Start menu.

In addition, you can navigate to the bin directory of your MySQL installation and launch the `MySQLInstanceConfig.exe" file directly.

数据挖掘研究院

2.3.5.3 Choosing a Maintenance Option

If the MySQL Configuration Wizard detects an existing `my.ini" file, you will have the option of either re-configuring your existing server, or removing the server instance by deleting the `my.ini" file and stopping and removing the MySQL service. 数据挖掘研究院

To reconfigure an existing server, choose the Re-configure Instance option and click the Next button. Your existing `my.ini" file will be renamed to my timestamp.ini.bak, where timestamp is the date and time the existing `my.ini" file was created. To remove the existing server instance, choose the Remove Instance option and click the Next button.

If you choose the Remove Instance option, you advance to a confirmation window. Click the Execute button and the MySQL Configuration Wizard will stop and remove the MySQL service and delete the `my.ini" file. The server installation and its data folder will not be removed.

If you choose the Re-configure Instance option, you advance to the Configuration Type dialog where you can choose the type of installation you wish to configure. 数据挖掘研究院

2.3.5.4 Choosing a Configuration Type

When you start the MySQL Configuration Wizard for a new MySQL installation, or choose the Re-configure Instance option for an existing installation, you advance to the Configuration Type dialog.

数据挖掘实验室

There are two configuration types available: Detailed Configuration and Standard Configuration. The Standard Configuration option is intended for new users who want to get started with MySQL quickly without having to make a lot of decisions in regards to server configuration. The Detailed Configuration option is intended for advanced users who want more fine-grained control of server configuration. 数据挖掘研究院

If you are new to MySQL and need a server configured as a single-user developer machine the Standard Configuration will suit your needs. Choosing the Standard Configuration option causes the MySQL Configuration Wizard to automatically set all configuration options with the exception of the Service Options and Security Options. 数据挖掘研究院

The Standard Configuration sets options that may be incompatible with systems where there are existing MySQL installations. If you have an existing MySQL installation on your system in addition to the installation you wish to configure, the Detailed Configuration option is recommended. 数据挖掘研究院

To complete the Standard Configuration, please refer to the sections on Service Options and Security Options, located at section 2.3.5.11 The Service Options Dialog and section 2.3.5.12 The Security Options Dialog respectively.

数据挖掘研究院

2.3.5.5 The Server Type Dialog

There are three different server types available to choose from, and the server type you choose will affect the decisions the MySQL Configuration Wizard makes with regards to memory, disk, and processor usage.

数据挖掘研究院

  • Developer Machine: Choose this option for a typical desktop workstation where MySQL is intended only for personal use. It is assumed that many other desktop applications will be running. The MySQL server will be configured to use minimal system resources.
  • Server Machine: Choose this option for a server machine where the MySQL server will be running alongside other server applications such as FTP, email, and web servers. The MySQL server will be configured to use a medium portion of the system resources.
  • Dedicated MySQL Server Machine: Choose this option for a server machine that is intended to run only the MySQL server. It is assumed that no other applications will be running. The MySQL server will be configured to use all available system resources.

2.3.5.6 The Database Usage Dialog

The Database Usage dialog allows you to indicate the table handlers you expect to use when creating MySQL tables. The option you choose will determine whether the InnoDB table handler is available and what percentage of the server resources are available to InnoDB.

数据挖掘实验室

  • Multifunctional Database: This option enables both the InnoDB and MyISAM table handlers and divides resources evenly between the two. This option is recommended for users that will use both table handlers on a regular basis.
  • Transactional Database Only: This option enables both the InnoDB and MyISAM table handlers but dedicates most server resources toward the InnoDB table handler. This option is recommended for users that will use InnoDB almost exclusively and will make only minimal use of MyISAM.
  • Non-Transactional Database Only: This option disables the InnoDB table handler completely and dedicates all server resources to the MyISAM table handler. This option is recommended for users who will not be using InnoDB.

2.3.5.7 The InnoDB Tablespace Dialog

Some users may want to locate the InnoDB tablespace files in a different location than the MySQL server data directory. Placing the tablespace files in a seperate location can be desireable if your system has a higher capacity or higher performance storage device available, such as a RAID storage system. 数据挖掘研究院

To change the default location for the InnoDB tablespace files, choose a new drive from the drop-down list of drive letters and choose a new path from the drop-down list of paths. To create a custom path, click the ... button. 数据挖掘实验室

If you are modifying the configuration of an existing server, you must click the Modify button before you change the path. In this situation you will have to manually move the existing tablespace files to the new location before starting the server.

2.3.5.8 The Concurrent Connections Dialog

It is important to set a limit to the number of concurrent connections to the MySQL server that can be established to prevent the server from running out of resources. The Concurrent Connections dialog allows you to choose the expected usage of your server, and will set the limit for concurrent connections accordingly. It is also possible to manually set the concurrent connection limit. 数据挖掘研究院

  • Decision Support (DSS)/OLAP: Choose this option if your server will not require a large number of concurrent connections. The maximum number of connections will be set at 100, with an average of 20 concurrent connections assumed.
  • Online Transaction Processing (OLTP): Choose this option if your server will require a large number of concurrent connections. The maximum number of connections will be set at 500.
  • Manual Setting: Choose this option to manually set the maximum number of concurrent connections to the server. Choose the number of concurrent connections from the drop-down box provided, or type the maximum number of connections into the drop-down box if the number you desire is not listed.

2.3.5.9 The Networking Options Dialog

Use the Networking Options dialog to enable or disable TCP/IP networking and to configure the port number that is used to connect to the MySQL server.

数据挖掘研究院

TCP/IP networking is enabled by default. To disable TCP/IP networking, uncheck the box next to the Enable TCP/IP Networking option. 数据挖掘研究院

Port 3306 is used by default. To change the port used to access MySQL, choose a new port number from the drop-down box or type a new port number directly into the drop-down box. If the port number you choose is already in use you will be prompted to confirm your choice of port number.

数据挖掘研究院

2.3.5.10 The Character Set Dialog

The MySQL server supports multiple character sets and it is possible to set a default server character set that will be applied to all tables, columns, and databases unless overridden. Use the Character Set dialog to change the default character set of the MySQL server.

数据挖掘研究院

  • Standard Character Set: Choose this option if you want to use Latin1 as the default server character set. Latin1 is used for English and many Western European languages.
  • Best Support For Multilingualism: Choose this option if you want to use UTF8 as the default server character set. UTF8 can store characters from many different languages in a single character set.
  • Manual Selected Default Character Set / Collation: Choose this option if you want to pick the server"s default character set manually. Choose the desired character set from the provided drop-down list.

2.3.5.11 The Service Options Dialog

On Windows NT based platforms, the MySQL server can be installed as a service. When installed as a service, the MySQL server can be started automatically during system startup, and even restarted automatically by Windows in the event of a service failure. 数据挖掘研究院

The MySQL Configuration Wizard will install the MySQL server as a service by default, using the service name MySQL. If you do not wish to install the service, un-check the box next to the Install As Windows Service option. You can changed the service name by picking a new service name from the drop-down box provided or by typing a new service name into the drop-down box. 数据挖掘研究院

To install the MySQL server as a service but not have it started automatically at startup, un-check the box next to the Launch the MySQL Server automatically option. 数据挖掘研究院

2.3.5.12 The Security Options Dialog

It is strongly recommended that you set a root password for your MySQL server, and the MySQL Configuration Wizard requires you set a root password by default. If you do not wish to set a root password, un-check the box next to the Modify Security Settings option. 数据挖掘研究院

To set the root password, type the desired password into both the New root password and Confirm boxes. If you are re-configuring an existing server, you will also need to enter the existing root password into the Current root password box. 数据挖掘研究院

To prevent root logins from across the network, check the box next to the Root may only connect from localhost option. This will increase the security of your root account.

数据挖掘研究院

To create an anonymous user account, check the box next to the Create An Anonymous Account option. Creating an anonymous account can decrease server security and cause login and permission difficulties and is not recommended.

数据挖掘研究院

2.3.5.13 The Confirmation Dialog

The final dialog in the MySQL Configuration Wizard is the Confirmation Dialog. To start the configuration process, click the Execute button. To return to a previous dialog, click the Back button. To exit the MySQL Configuration Wizard without configuring the server, click the Cancel button. 数据挖掘研究院

After you click the Execute button, the MySQL Configuration Wizard will perform a series of tasks with progress displayed onscreen as the tasks are performed. 数据挖掘研究院

The MySQL Configuration Wizard will first determine various configuration file options based on your choices using a template prepared by MySQL AB developers and engineers. This template is named `my-template.ini" and is located in your server installation directory. 数据挖掘研究院

The MySQL Configuration Wizard will then write these options to a `my.ini" file. The final location of the `my.ini" file will be displayed next to the Write configuration file task. 数据挖掘研究院

If you chose to create a service for the MySQL server the MySQL Configuration Wizard will create the service and start it. If you are re-configuring an existing service, the MySQL Configuration Wizard will restart the service to apply your configuration changes. 数据挖掘研究院

If you chose to set a root password, the MySQL Configuration Wizard will connect to the server and set your new root password and apply any other security setting you may have selected. 数据挖掘研究院

After the MySQL Configuration Wizard has completed its tasks, a summary will be shown. Click the Finish button to exit the MySQL Configuration Wizard.

数据挖掘实验室

2.3.5.14 The Location of the my.ini File

In MySQL installations prior to version 4.1.5 it was customary to name the server configuration file `my.cnf" or `my.ini" and locate the file either at `c:my.cnf" or `c:Windowsmy.ini".

The new MySQL Configuration Wizard places the `my.ini" file in the installation directory of the MySQL server. This helps associate configuration files with particular server instances. 数据挖掘研究院

To ensure that the MySQL server knows where to look for the `my.ini" file, an argument similar to this is passed to the MySQL server as part of the service installation: --defaults-file="C:Program FilesMySQLMySQL Server 4.1my.ini", where C:Program FilesMySQLMySQL Server 4.1 is replaced with the installation path to the MySQL Server.

The --defaults-file instructs the MySQL server to read the specified file for configuration options.

数据挖掘研究院

2.3.5.15 Editing The my.ini File

To modify the `my.ini" file, open it with a text editor and make any necessary changes. You can also modify the server configuration with the MySQL Administrator utility. 数据挖掘实验室

MySQL clients and utilities such as the mysql command-line client and mysqldump will not locate the `my.ini" file located in the server installation directory. To configure the client and utility applications, create a new `my.ini" file in the `c:Windows" directory. 数据挖掘研究院

2.3.6 Installing MySQL from a noinstall Zip Archive

Users who are installing from the Noinstall package, or who are installing a version of MySQL prior to 4.1.5 can use the instructions in this section to manually install MySQL. If you are installing a version prior to 4.1.5 with an install package that includes a Setup program, substitute running the Setup program for extracting the archive.

数据挖掘研究院

The process for installing MySQL from a Zip archive is as follows:

数据挖掘研究院

  1. Extract the archive to the desired install directory.
  2. Create an option file.
  3. Choose a MySQL server type.
  4. Start the MySQL server.
  5. Secure the default user accounts.

This process is described in the sections that follow. 数据挖掘研究院

2.3.7 Extracting the Install Archive

To install MySQL manually, do the following: 数据挖掘研究院

  1. If you are upgrading from a previous version please refer to section 2.3.15 Upgrading MySQL on Windows before beginning the upgrade process.
  2. If you are using a Windows NT-based operating system such as Windows NT, Windows 2000, Windows XP, or Windows Server 2003, make sure that you are logged in as a user with administrator privileges.
  3. Choose an installation location. Traditionally the MySQL server is installed at `C:mysql", and the new MySQL Installation Wizard installs MySQL to `C:Program FilesMySQL". If you do not install MySQL at `C:mysql", you must specify the path to the install directory during startup or in an option file. See section 2.3.8 Creating an Option File.
  4. Extract the install archive to the chosen installation location using your preferred Zip archive tool. Some tools may extract the archive to a folder within your chosen installation location. If this occurs you can move the contents of the subfolder into the chosen installation location.