Chapter 2. Installing and Upgrading MySQL 2.1. MySQL Installation Overview This chapter describes how to obtain and install MySQL. You can choose to install MySQL Enterprise or MySQL Community Server: * MySQL Enterprise is MySQL AB's commercial offering for modern enterprise businesses. It includes MySQL Enterprise Server and the services provided by MySQL Network. To install MySQL Enterprise, see Section 2.3, "Installing MySQL Enterprise." * MySQL Community Server is for users who are comfortable configuring and administering MySQL by themselves. To install MySQL Community Server, see Section 2.4, "Installing MySQL Community Server." If you plan to upgrade an existing version of MySQL to a newer version rather than install MySQL for the first time, see Section 2.4.17, "Upgrading MySQL," for information about upgrade procedures and about issues that you should consider before upgrading. If you are interested in migrating to MySQL from another database system, you may wish to read Section A.8, "MySQL 5.0 FAQ --- Migration," which contains answers to some common questions concerning migration issues. 2.2. Determining your current MySQL version To determine the version and release of your currently installed MySQL installation, there are a number of options. * Using a command client (mysql), the server version of the MySQL server to which you are connected is shown once you are connected. The server version information includes community or enterprise accordingly. For example, here is the output from a MySQL Community Server edition installed on Linux: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 6 Server version: 5.0.27-standard MySQL Community Edition - Standard (G PL) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> This is an example of the output from MySQL Enterprise Server on Windows: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.0.28-enterprise-gpl-nt MySQL Enterprise Server (GPL ) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. * You may also determine the version information using the version variables. Both the version and version_comment variables contain version information for the server to which you are connected. Use the SHOW VARIABLES statement to obtain the information you want, as shown in this example: mysql> SHOW VARIABLES LIKE "%version%"; +-------------------------+------------------------------------------ + | Variable_name | Value | +-------------------------+------------------------------------------ + | protocol_version | 10 | | version | 5.0.27-standard | | version_comment | MySQL Community Edition - Standard (GPL) | | version_compile_machine | i686 | | version_compile_os | pc-linux-gnu | +-------------------------+------------------------------------------ + 5 rows in set (0.04 sec) Note MySQL Administrator shows the server version within the Server Information tab. However, only the value of version is shown. * The STATUS command displays the version as well as version comment information. For example: mysql> STATUS; -------------- ./client/mysql Ver 14.12 Distrib 5.0.29, for pc-linux-gnu (i686) usi ng readline 5.0 Connection id: 8 Current database: Current user: mc@localhost SSL: Not in use Current pager: /usr/bin/less Using outfile: '' Using delimiter: ; Server version: 5.0.27-standard MySQL Community Edition - Sta ndard (GPL) Protocol version: 10 Connection: Localhost via UNIX socket Server characterset: latin1 Db characterset: latin1 Client characterset: latin1 Conn. characterset: latin1 UNIX socket: /tmp/mysql.sock Uptime: 1 day 3 hours 58 min 43 sec Threads: 2 Questions: 17 Slow queries: 0 Opens: 11 Flush tables: 1 Open tables: 6 Queries per second avg: 0.000 -------------- 2.3. Installing MySQL Enterprise This section does not apply to MySQL Community Server users. This section contains information about the components, installation and initial configuration requirements for installing MySQL Enterprise. 2.3.1. Overview of MySQL Enterprise Installation To obtain MySQL Enterprise, visit http://enterprise.mysql.com if you're a customer. Otherwise, visit http://www.mysql.com/products/enterprise/. The platforms that are officially supported for MySQL Enterprise are listed at http://www.mysql.com/support/supportedplatforms.html. MySQL Enterprise Server is available for download in the form of Quarterly Service Pack (QSP) or Monthly Rapid Update (MRU) binary releases. To install MySQL Enterprise Server, you should use the latest available Quarterly Service Pack (QSP). This includes an accumulation of the bug fixes provided in all predecessor QSP and MRU releases. MRU releases are provided on a monthly basis and represent the most current Enterprise Server bug fixes. Each MRU is an accumulation of the bug fixes included in its predecessor. Customers should standardize on the latest MRU release only if it includes a needed bug fix. 2.3.2. Enterprise Server Distribution Types This section does not apply to MySQL Community Server users. Enterprise Server releases will be created for the following packages from the MySQL 5.0 tree: * mysql-enterprise: Released under a commercial license and includes the following storage engines: MyISAM, MEMORY, MERGE, InnoDB, ARCHIVE, BLACKHOLE, EXAMPLE, FEDERATED. * mysql-enterprise-gpl: Same as mysql-enterprise, but released under the GPL. * mysql-cluster: mysql-enterprise plus MySQL Cluster (NDB). * mysql-classic: Released under a commercial license, does not include InnoDB. * mysql-community: Same as mysql-enterprise-gpl, but available for the community, and released every 6 months. To satisfy different user requirements, we provide several servers. mysqld is an optimized server that is a smaller, faster binary. mysqld-debug is compiled with debugging support but is otherwise configured identically to the non-debug server. Each of these servers is compiled from the same source distribution, though with different configuration options. All native MySQL clients can connect to servers from either MySQL version. 2.3.3. Installing the Enterprise MySQL Server For Windows and Mac OS X platforms you will need to use the MySQL installer. For all other other platforms, you will need to use the TAR, Zip or native package format (RPM, Solaris PKG) pafiles to perform the installation. 2.3.4. Upgrading MySQL Enterprise Server This section does not apply to MySQL Community Server users. When upgrading to MySQL Enterprise from Community Server you need only follow the installation process to install and upgrade the packages to the latest version provided by MySQL Enterprise. You will also need to install the latest MySQL Enterprise Service Pack and any outstanding MySQL Hot-fix packs. Be aware, however, that you must take into account any of the changes when moving between major releases. You should also check the release notes (see Appendix C, "MySQL Enterprise Release Notes") for details on major changes between revisions of MySQL Enterprise Server. For details of changes in other packages in MySQL Enterprise, see Appendix E, "MySQL Change History." You should also review the notes and advice contained within Section 2.4.17, "Upgrading MySQL." 2.3.5. Uninstalling MySQL Enterprise This section does not apply to MySQL Community Server users. You can uninstall MySQL Enterprise using the standard tools according to your operating system. Note When uninstalling, any data files created are not removed. You will need to separately remove these files to completely remove MySQL from your system. 2.3.5.1. Uninstalling on Windows To uninstall MySQL Enterprise on Windows you should use the Add or Remove Programs utility located within the Control Panel. Uninstalling MySQL Enterprise Packages within MySQL Enterprise must be removed individually. You may also use this option to remove packages that you no longer want or use. Any data you created while MySQL Enterprise was installed will not be removed. You will need to separately delete this information. 2.3.5.2. Uninstalling on Linux (RPMs) To uninstall MySQL Enterprise on a Linux operating system that uses the RPM package format, you must remove each of the packages that were installed by the MySQL Enterprise Installer individually. To do this, first obtain a list of the installed packages: shell> rpm -q -a|grep -i mysql mysql-docs-en-5.0.26-1 MySQL-server-standard-5.0.26-0.rhel4 mysql-connector-j-5.0.3-1 MySQL-devel-standard-5.0.26-0.rhel4 mysql-query-browser-5.0r4-1rhel4 mysql-connector-odbc-3.51.12-1 MySQL-client-standard-5.0.26-0.rhel4 mysql-administrator-5.0r4-1rhel4 mysql-gui-tools-5.0r4-1rhel4 mysql-setup-wizard-1.0-1 mysql-connector-net-1.0.7-1 You can remove these packages individually, or all together automatically, like this: shell> rpm -q -a|grep -i mysql|xargs rpm --erase 2.4. Installing MySQL Community Server 2.4.1. Overview of MySQL Community Server Installation 1. Determine whether MySQL runs and is supported on your platform. Not all platforms are equally suitable for running MySQL, and not all platforms on which MySQL is known to run are officially supported by MySQL AB. For a list of platforms on which MySQL Community Server runs, see Section 2.4.2, "Operating Systems Supported by MySQL Community Server." 2. Choose which distribution to install. Several versions of MySQL are available, and most are available in multiple distribution formats. You can choose from prepackaged distributions containing binary (precompiled) programs or source code. When in doubt, use a binary distribution. We also provide public access to our current source trees for those who want to see our most recent developments and to help us test new code. To determine which version and type of distribution you should use, see Section 2.4.3, "Choosing Which MySQL Distribution to Install." 3. Download the distribution that you want to install. For download instructions, see Section 2.4.4, "How to Get MySQL." To verify the integrity of the distribution, use the instructions in Section 2.4.5, "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.4.7, "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.4.15, "MySQL Installation Using a Source Distribution." If you encounter installation difficulties, see Section 2.4.19, "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.4.16, "Post-Installation Setup and Testing," which 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 information in this section applies whether you install MySQL using a binary or source distribution. 6. Perform setup for running benchmarks (optional). If you want to use the MySQL benchmark scripts, Perl support for MySQL must be available. See Section 2.4.21, "Perl Installation Notes," for more information. The sections immediately following this one contain necessary information about choosing, downloading, and verifying your distribution. The instructions in later sections of the chapter describe how to install the distribution that you choose. For binary distributions, see the instructions in Section 2.4.7, "Standard MySQL Installation Using a Binary Distribution." To build MySQL from source, use the instructions in Section 2.4.15, "MySQL Installation Using a Source Distribution." 2.4.2. Operating Systems Supported by MySQL Community Server This section does not apply to MySQL Enterprise Server users. This section lists the operating systems on which MySQL Community Server is known to run. Important MySQL AB does not necessarily provide official support for all the platforms listed in this section. For information about those platforms which MySQL AB officially supports, see MySQL Server Supported Platforms (http://www.mysql.com/support/supportedplatforms.html) on the MySQL Web site. 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.) MySQL has been reported to compile successfully on the following combinations of operating system and thread package. * AIX 4.x and 5.x with native threads. See Section 2.4.19.5.3, "IBM-AIX notes." * Amiga. * FreeBSD 5.x and up with native threads. * HP-UX 11.x with native threads. See Section 2.4.19.5.2, "HP-UX Version 11.x Notes." * Linux. MySQL builds on all fairly recent Linux distributions with glibc 2.3. See Section 2.4.19.1, "Linux Notes." * Mac OS X. See Section 2.4.19.2, "Mac OS X Notes." * NetBSD 1.3/1.4 Intel and NetBSD 1.3 Alpha. See Section 2.4.19.4.2, "NetBSD Notes." * Novell NetWare 6.0 and 6.5. See Section 2.4.13, "Installing MySQL on NetWare." * OpenBSD 2.5 and with native threads. OpenBSD earlier than 2.5 with the MIT-pthreads package. See Section 2.4.19.4.3, "OpenBSD 2.5 Notes." * SCO OpenServer 5.0.X with a recent port of the FSU Pthreads package. See Section 2.4.19.5.8, "SCO UNIX and OpenServer 5.0.x Notes." * SCO Openserver 6.0.x. See Section 2.4.19.5.9, "SCO OpenServer 6.0.x Notes." * SCO UnixWare 7.1.x. See Section 2.4.19.5.10, "SCO UnixWare 7.1.x and OpenUNIX 8.0.0 Notes." * SGI Irix 6.x with native threads. See Section 2.4.19.5.7, "SGI Irix Notes." * Solaris 2.5 and above with native threads on SPARC and x86. See Section 2.4.19.3, "Solaris Notes." * Tru64 Unix. See Section 2.4.19.5.5, "Alpha-DEC-UNIX Notes (Tru64)." * Windows 2000, XP, and Windows Server 2003, as well as 32-bit Windows Vista. See Section 2.4.8, "Installing MySQL on Windows." MySQL has also been known to run on other systems in the past. See Section 2.4.19, "Operating System-Specific Notes." Some porting effort might be required for current versions of MySQL on these systems. 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 is only as stable as the thread library it calls, even if everything else is perfect. * The capability of the kernel and the thread library to take advantage of symmetric multi-processor (SMP) systems. When a process creates a thread, it should be possible for that thread to run on a CPU different from the original process. * Multi-threading and handling of mutexes. 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() does not easily yield CPU time, this hurts MySQL tremendously. If this issue is not taken care of, adding extra CPUs actually makes MySQL slower. * Filesystem stability and performance. MySQL's stability and performance are directly affected by those of the operating platform's filesystem. In particular, where large tables are in use, performance is affected by the ability of the filesystem to deal with large files at all and to deal with them efficiently. * Expertise 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. This is also affected by the amount of testing we have done internally for similar configurations, as well as by the number of users that have run MySQL successfully on the platform in similar configurations. If these figures are high, the likelihood of encountering platform-specific surprises is much smaller. 2.4.3. Choosing Which MySQL Distribution to Install This section does not apply to MySQL Enterprise Server users. 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.4.3.1. Choosing Which Version of MySQL to Install This section does not apply to MySQL Enterprise Server users. 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.1 is the current development release series. * MySQL 5.0 is the current stable (production-quality) release series. New releases are issued for bugfixes only; no new features are being added that could effect stability. * MySQL 4.1, 4.0 and 3.23 are the old stable (production-quality) release series. MySQL 4.1 is now at the end of the product lifecycle. Active development and support for these versions has ended. Extended support for MySQL 4.1 and 4.0 is available. According to the MySQL Lifecycle Policy (seehttp://www.mysql.com/company/legal/lifecycle/#policy), only Security and Severity Level 1 issues will still be fixed for MySQL 4.0 and 4.1. We do not believe in a complete code freeze because this prevents us from making bugfixes and other fixes that must be done. By "somewhat frozen" we mean that we may add small things that should not affect anything that currently works in a production release. 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 5.0. 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 older system and want to upgrade, but do not 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 only 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 Bazaar repositories. These are not "releases" as such, but are available as previews of the code on which future releases are to be based. The MySQL naming scheme uses release names that consist of three numbers and a suffix; for example, mysql-5.0.12-beta. The numbers within the release name are interpreted as follows: * The first number (5) is the major version and describes the file format. All MySQL 5 releases have the same file format. * The second number (0) is the release level. Taken together, the major version and release level constitute the release series number. * The third number (12) 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 is for preview purposes only. Known bugs should be documented in the News section (see Appendix E, "MySQL Change History"). Most alpha releases implement new commands and extensions. Active development that may involve major code changes can occur in an alpha release. However, we do conduct testing before issuing a release. * beta indicates that the release is appropriate for use with new development. Within beta releases, the features and compatibility should remain consistent. However, beta releases may contain numerous and major unaddressed bugs. No APIs, externally visible structures, or columns for SQL statements will change during future beta, release candidate, or production releases. * rc indicates a Release Candidate. Release candidates are believed to be stable, having passed all of MySQL's internal testing, and with all known fatal runtime bugs fixed. However, the release has not been in widespread use long enough to know for sure that all bugs have been identified. Only minor fixes are added. (A release candidate is what formerly was known as a gamma release.) * If there is no suffix, it indicates that the release is a General Availability (GA) or Production release. GA releases are stable, having successfully passed through all earlier release stages and are believed to be reliable, free of serious bugs, and suitable for use in production systems. Only critical bugfixes are applied to the release. MySQL uses a naming scheme that is slightly different from most other products. In general, it is usually safe to use any version that has been out for a couple of weeks without being replaced by a new version within the same 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 these tools: * Our internal test suite. The mysql-test directory contains an extensive set of test cases. We run these tests for every server binary. See Section 28.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 determine 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." We also test 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.4.3.2. Choosing a Distribution Format This section does not apply to MySQL Enterprise Server users. 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 PKG package installers for Mac OS X or Solaris. 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 several servers in binary distributions. mysqld is an optimized server that is a smaller, faster binary. mysqld-debug is compiled with debugging support. Each of these servers is compiled from the same source distribution, though with different configuration options. All native MySQL clients can connect to servers from either MySQL version. Under some circumstances, you may 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 installation location, but you might require even more flexibility to place MySQL components where you want. * You want to configure mysqld to ensure that features are available that might not be included in the standard binary distributions. Here is a list of the most common extra options that you may want to use to ensure feature availability: + --with-berkeley-db (not available on all platforms) + --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 Bazaar 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 is committed to the source repository and you can access it there. The bugfix does 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.4.3.3. How and When Updates Are Released MySQL is evolving quite rapidly and we want to share new developments with other MySQL users. We try to produce a new release whenever we have new and useful features that others also seem to have a need for. We also try to help users who request features that are easy to implement. We take note of what our licensed users want, and we especially take note of what our support customers want and try to help them in this regard. No one is required to download a new release. The News section helps you determine whether the new release has something you really want. See Appendix E, "MySQL Change History." We use the following policy when updating MySQL: * Enterprise Server releases are meant to appear every 18 months, supplemented by quarterly service packs and monthly rapid updates. Community Server releases are meant to appear 2-3 times per year. * Releases are issued within each series. Enterprise Server releases are numbered using even numbers (for example, 5.0.20). Community Server releases are numbered using odd numbers (for example, 5.0.21). * 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 in source form immediately from our public Bazaar repositories, and are included in the next release. * If by any chance a security vulnerability or critical bug is found in a release, our policy is to fix it in a new release as soon as possible. (We would like other companies to do this, too!) 2.4.3.4. MySQL Binaries Compiled by MySQL AB This section does not apply to MySQL Enterprise Server users. 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.4.7, "Standard MySQL Installation Using a Binary Distribution." The RPM distributions for MySQL 5.0 releases that we make available through our Web site are generated by MySQL AB. For Windows distributions, see Section 2.4.8, "Installing MySQL on Windows." These distributions are generated using the script scripts/make_binary_distribution. The 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. Anyone who has more optimal options for any of the following configure commands can mail them to the MySQL internals mailing list. See Section 1.6.1, "MySQL Mailing Lists." If you want to compile a debug version of MySQL, you should add --with-debug or --with-debug=full to the following configure commands and remove any -fomit-frame-pointer options. 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.1 or later releases): CC=icc CXX=icpc 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-innod b Note Versions 8.1 and newer of the Intel compiler have separate drivers for 'pure' C (icc) and C++ (icpc); if you use icc version 8.0 or older for building MySQL, you need to set CXX=icc. * 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/b in --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/b in --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="-O 3 -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=-lc urses --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/mysq l/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=powe rpc -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/mysq l/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/mysq l/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.7 i386 with gcc 2.95.3: CFLAGS="-O3 -mpentium" LDFLAGS=-static CXX=gcc CXXFLAGS="-O3 -mpentiu m -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-cli ent --disable-shared * SCO UnixWare 7.1.4 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-cli ent --disable-shared --with-readline * SCO OpenServer 6.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-cli ent --disable-shared --with-readline * 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-share d --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/b in --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 x86 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=comp lex --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 2.4.4. How to Get MySQL This section does not apply to MySQL Enterprise Server users. Check our downloads page at http://dev.mysql.com/downloads/ for information about the current version of MySQL and for downloading instructions. For a complete up-to-date list of MySQL download mirror sites, see http://dev.mysql.com/downloads/mirrors.html. You can also find information there 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.4.5. Verifying Package Integrity Using MD5 Checksums or GnuPG This section does not apply to MySQL Enterprise Server users. 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.4.5.1. Verifying the MD5 Checksum This section does not apply to MySQL Enterprise Server users. 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-5.0.68-linux-i686.tar.gz aaab65abbec64d5e907dcd41b8699945 mysql-standard-5.0.68-linux-i686.ta r.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 Make sure to verify the checksum of the archive file (for example, the .zip or .tar.gz file) and not of the files that are contained inside of the archive. 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 use the command openssl md5 package_name instead. A Windows implementation of the md5 command line utility is available from http://www.fourmilab.ch/md5/. winMd5Sum is a graphical MD5 checking tool that can be obtained from http://www.nullriver.com/index/products/winmd5sum. 2.4.5.2. Signature Checking Using GnuPG This section does not apply to MySQL Enterprise Server users. 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. At MySQL AB, we sign MySQL downloadable packages with GnuPG (GNU Privacy Guard). GnuPG is an Open Source alternative to the 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 ship with GnuPG installed by default. For more information about GnuPG, 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, which you can download 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) 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----- To import the build key into your personal public GPG keyring, use gpg --import. For example, if you have saved the key in a file named mysql_pubkey.asc, the import command looks like this: shell> gpg --import mysql_pubkey.asc 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-5.0.68-linux-i686.tar.gz Signature file mysql-standard-5.0.68-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-5.0.68-linux-i686.tar.gz.asc gpg: Signature made Tue 12 Jul 2005 23:35:41 EST using DSA key ID 507 2E1F5 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 any insecure memory warning you might obtain. See the GPG documentation for more information on how to work with public keys. 2.4.5.3. Signature Checking Using RPM This section does not apply to MySQL Enterprise Server users. 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-5.0.68-0.glibc23.i386.rpm MySQL-server-5.0.68-0.glibc23.i386.rpm: md5 gpg OK Note If you are using RPM 4.1 and it shows the error (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 Section 2.4.5.2, "Signature Checking Using GnuPG." Then use rpm --import to import the key. For example, if you have saved the public key 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.4.5.2, "Signature Checking Using GnuPG." 2.4.6. Installation Layouts This section describes the default layout of the directories created by installing binary or source distributions provided by MySQL AB. A distribution provided by another vendor might use a layout different from those shown here. For MySQL 5.0 on Windows, the default installation directory is C:\Program Files\MySQL\MySQL Server 5.0. (Some Windows users prefer to install in C:\mysql, the directory that formerly was used as the default. However, the layout of the subdirectories remains the same.) The installation directory has the following subdirectories: Directory Contents bin Client programs and the mysqld server data Log files, databases Docs Manual in CHM format examples Example programs and scripts include Include (header) files lib Libraries scripts Utility scripts share Error message files Installations created from MySQL AB's Linux RPM distributions result in files under the following system directories: Directory Contents /usr/bin Client programs and scripts /usr/sbin The mysqld server /var/lib/mysql Log files, databases /usr/share/info Manual in Info format /usr/share/man Unix man pages /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 bin Client programs and the mysqld server data Log files, databases docs Manual in Info format man Unix manual pages 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 bin Client programs and scripts include/mysql Include (header) files Docs Manual in Info, CHM formats man Unix manual pages 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 its 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.4.7. Standard MySQL Installation Using a Binary Distribution This section does not apply to MySQL Enterprise Server users. 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 installation.) However, binary distributions of MySQL are available for many other platforms as well. See Section 2.4.14, "Installing MySQL from tar.gz Packages on Other Unix-Like Systems," for generic installation instructions for these packages that apply to all platforms. See Section 2.4, "Installing MySQL Community Server," for more information on what other binary distributions are available and how to obtain them. 2.4.8. Installing MySQL on Windows This section does not apply to MySQL Enterprise Server users. A native Windows distribution of MySQL has been available from MySQL AB since version 3.21 and represents a sizable percentage of the daily downloads of MySQL. This section describes the process for installing MySQL on Windows. Note If you are upgrading MySQL from an existing installation older than MySQL 4.1.5, you must first perform the procedure described in Section 2.4.8.14, "Upgrading MySQL on Windows." To run MySQL on Windows, you need the following: * A Windows operating system such as 2000, XP, Vista, or Windows Server 2003. Only 32-bit and 64-bit versions of Windows 2000 and later are supported; however, 64-bit Windows Vista is not yet supported. Windows 95/98/ME and versions of Windows older than these are no longer supported. A Windows operating system permits you to run the MySQL server as a service. See Section 2.4.8.11, "Starting MySQL as a Windows Service." Generally, you should install MySQL on Windows using an account that has administrator rights. Otherwise, you may encounter problems with certain operations such as editing the PATH environment variable or accessing the Service Control Manager. * TCP/IP protocol support. * 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.) For a list of limitations within the Windows version of MySQL, see Section F.7.3, "Windows Platform Limitations." There may also be other requirements, depending on how you plan to use MySQL: * If you plan to connect to the MySQL server via ODBC, you need a Connector/ODBC driver. See Chapter 27, "Connectors." * 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 12.1.5, "CREATE TABLE Syntax." MySQL for Windows is available in several distribution formats: * Binary distributions are available that contain a setup program that installs everything you need so that you can start the server immediately. Another binary distribution format contains an archive that you simply unpack in the installation location and then configure yourself. For details, see Section 2.4.8.1, "Choosing An Installation Package." * The source distribution contains all the code and support files for building the executables using the Visual Studio compiler system. Generally speaking, you should use a binary distribution that includes an installer. It is simpler to use than the others, and you need no additional tools to get MySQL up and running. The installer for the Windows version of MySQL, combined with a GUI Configuration Wizard, automatically installs MySQL, creates an option file, starts the server, and secures the default user accounts. Caution Using virus scanning software such as Norton/Symantec Anti-Virus on directories containing MySQL data and temporary tables can cause issues, both in terms of the performance of MySQL and the virus-scanning software mis-identifying the contents of the files as containing spam. This is because of the fingerprinting mechanism used by the virus scanning software, and the way in which MySQL rapidly updates different files, which may be identified as a potential security risk. After installing MySQL Server, it is recommended that you disable virus scanning on main directory (datadir) being used to store your MySQL table data. There is usually a system built into the virus scanning software to allow certain directories to be specifically ignored during virus scanning. In addition, by default, MySQL creates temporary files in the standard Windows temporary directory. To prevent the temporary files also being scanned, you should configure a separate temporary directory for MySQL temporary files and add this to the virus scanning exclusion list. To do this, add a configuration option for the tmpdir parameter to your my.ini configuration file. For more information, see Section 2.4.8.7, "Creating an Option File," and tmpdir. The following section describes how to install MySQL on Windows using a binary distribution. To use an installation package that does not include an installer, follow the procedure described in Section 2.4.8.5, "Installing MySQL from a Noinstall Zip Archive." To install using a source distribution, see Section 2.4.15.6, "Installing MySQL from Source on Windows." MySQL distributions for Windows can be downloaded from http://dev.mysql.com/downloads/. See Section 2.4.4, "How to Get MySQL." 2.4.8.1. Choosing An Installation Package This section does not apply to MySQL Enterprise Server users. For MySQL 5.0, there are three installation packages to choose from when installing MySQL on Windows: * The Essentials package. This package has a filename similar to mysql-essential-5.0.68-win32.msi and contains the minimum set of 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-5.0.68-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 no-install archive. This package has a filename similar to mysql-noinstall-5.0.68-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. It is provided as an .msi file for use with the Windows Installer. The Complete and Noinstall distributions are packaged as Zip archives. To use them, you must have a tool that can unpack .zip files. 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.4.8.2, "Installing MySQL with the Automated Installer." If you choose to install MySQL from the Noinstall archive, see Section 2.4.8.5, "Installing MySQL from a Noinstall Zip Archive." 2.4.8.2. Installing MySQL with the Automated Installer New MySQL users can use the MySQL Installation Wizard and MySQL Configuration Wizard to install MySQL on Windows. These 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. They are recommended for most standard MySQL installations. Exceptions include users who need to install multiple instances of MySQL on a single server host and advanced users who want complete control of server configuration. 2.4.8.3. Using the MySQL Installation Wizard 2.4.8.3.1. Introduction to the Installation Wizard MySQL Installation Wizard is an 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 shut down and remove their existing MySQL installations manually before installing MySQL with the MySQL Installation Wizard. See Section 2.4.8.3.7, "Upgrading MySQL with the Installation Wizard," for more information on upgrading from a previous version. The Microsoft Windows Installer (MSI) is the standard for application installations on Windows 2000 and later versions. The MySQL Installation Wizard makes use of this technology to provide a smoother and more flexible installation process. 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 (http://support.microsoft.com/default.aspx?scid=kb;EN-US;292539) for information on upgrading to the latest version of the Windows Installer Engine. In addition, Microsoft has introduced the WiX (Windows Installer XML) toolkit, which is the first highly acknowledged Open Source project from Microsoft. We have switched to WiX because it is an Open Source project and it allows us to handle the complete Windows installation process in a flexible manner using scripts. Improving the MySQL Installation Wizard depends on the support and feedback of users. If you find that the MySQL Installation Wizard is lacking some feature important to you, or if you discover a bug, please report it in our bugs database using the instructions given in Section 1.7, "How to Report Bugs or Problems." 2.4.8.3.2. Downloading and Starting the MySQL Installation Wizard MySQL installation 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. Note If you are installing on Windows Vista it is best to open a port for MySQL to use before beginning the installation. To do this, first ensure that you are logged in as an administrator, then go to the Control Panel and double-click the Windows Firewall icon. Choose the Allow a program through Windows Firewall option and click the Add port button. Enter MySQL into the Name text box and 3306 (or other port of your choice) into the Port number text box. Also ensure that the TCP protocol radio button is selected. If you wish, you can also limit access to the MySQL server by choosing the Change scope button. Confirm your choices by clicking the OK button. If you do not open a port prior to installation, you cannot configure the MySQL server immediately after installation. Additionally, when running the MySQL Installation Wizard on Windows Vista, ensure that you are logged in as a user with administrative rights. The process for starting the wizard depends on the contents of the installation package you download. If there is a setup.exe file present, double-click it to start the installation process. If there is an .msi file present, double-click it to start the installation process. MySQL Installer Main Screen (Windows) 2.4.8.3.3. Choosing an Installation Type There are three installation types available: Typical, Complete, and Custom. MySQL Installer Setup type (Windows) 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 is used. See Section 2.4.8.3.4, "The Custom Installation 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 verify your choices and begin the installation. If you choose the Custom installation type and click the Next button, you advance to the custom installation dialog, described in Section 2.4.8.3.4, "The Custom Installation Dialog." 2.4.8.3.4. The Custom Installation Dialog This section does not apply to MySQL Enterprise Server users. If you wish to change the installation path or the specific components that are installed by the MySQL Installation Wizard, choose the Custom installation type. MySQL Installer Custom Installation (Windows) A tree view on the left side of the custom install dialog lists all available components. Components that are not installed have a red X icon; components that are installed have a gray icon. To change whether a component is installed, click on that component's icon and choose a 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 installation components and installation path, click the Next button to advance to the confirmation dialog. 2.4.8.3.5. The Confirmation Dialog This section does not apply to MySQL Enterprise Server users. 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. MySQL Installer Installation Summary (Windows) 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 have the option of registering with the MySQL web site. Registration gives you access to post in the MySQL forums at forums.mysql.com (http://forums.mysql.com), along with the ability to report bugs at bugs.mysql.com (http://bugs.mysql.com) and to subscribe to our 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 settings. 2.4.8.3.6. Changes Made by MySQL Installation Wizard This section does not apply to MySQL Enterprise Server users. 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_MACHINE\SOFTWARE\MySQL AB. The MySQL Installation Wizard creates a key named after the major version of the server that is being installed, such as MySQL Server 5.0. 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 Files\MySQL\MySQL Server 5.0\. The Version string contains the release number. For example, for an installation of MySQL Server 5.0.68, the key contains a value of 5.0.68. 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 if you install MySQL 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 5.0, the MySQL Installation Wizard creates a MySQL Server 5.0 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 you connect. * 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 reconfigure 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 using the Essentials installation package. Changes to the File System The MySQL Installation Wizard by default installs the MySQL 5.0 server to C:\Program Files\MySQL\MySQL Server 5.0, where Program Files is the default location for applications in your system, and 5.0 is the major version of your MySQL server. This is the recommended location for the MySQL server, replacing the former default location C:\mysql. By default, all MySQL applications are stored in a common directory at C:\Program Files\MySQL, where Program Files is the default location for applications in your Windows installation. A typical MySQL installation on a developer machine might look like this: C:\Program Files\MySQL\MySQL Server 5.0 C:\Program Files\MySQL\MySQL Administrator 1.0 C:\Program Files\MySQL\MySQL Query Browser 1.0 This approach makes it easier to manage and maintain all MySQL applications installed on a particular system. 2.4.8.3.7. Upgrading MySQL with the Installation Wizard This section does not apply to MySQL Enterprise Server users. The 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 available only 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. See Section 2.4.8.14, "Upgrading MySQL on Windows." 2.4.8.4. MySQL Server Configuration Wizard The MySQL Server Configuration Wizard helps automate the process of configuring your server. It creates a custom MySQL configuration file (my.ini or my.cnf) by asking you a series of questions and then applying your responses to a template to generate the configuration file that is tuned to your installation. The MySQL Server Configuration Wizard is included with the MySQL 5.0 server. For Community Server users, the MySQL Server Configuration Wizard is available only for Windows. For Enterprise Server users, the MySQL Server Configuration Wizard is included as part of the standard Enterprise Installer. The MySQL Server Configuration Wizard is to a large extent the result of feedback that MySQL AB has received from many users over a period of several years. However, if you find that it lacks some feature important to you, please report it in our bugs database using the instructions given in Section 1.7, "How to Report Bugs or Problems." 2.4.8.4.1. Starting the MySQL Server Configuration Wizard The MySQL Server Configuration Wizard is normally started as part of the installation process. You should only need to run the MySQL Server Configuration Wizard again when you need to change the configuration parameters of your server. If you chose not to open a port prior to installing MySQL on Windows Vista, you can choose to use the MySQL Server Configuration Wizard after installation. However, you must open a port in the Windows Firewall. To do this see the instructions given in Section 2.4.8.3.2, "Downloading and Starting the MySQL Installation Wizard." Rather than opening a port, you also have the option of adding MySQL as a program that bypasses the Windows Firewall. One or the other option is sufficient --- you need not do both. Additionally, when running the MySQL Server Configuration Wizard on Windows Vista ensure that you are logged in as a user with administrative rights. MySQL Server Configuration Wizard 2.4.8.4.1.1. The MySQL Server Configuration Wizard on Windows You can launch the MySQL Configuration Wizard by clicking the MySQL Server Instance Config Wizard entry in the MySQL section of the Windows Start menu. Alternatively, you can navigate to the bin directory of your MySQL installation and launch the MySQLInstanceConfig.exe file directly. The MySQL Server Configuration Wizard places the my.ini file in the installation directory for 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 Files\MySQL\MySQL Server 5.0\my.ini" Here, C:\Program Files\MySQL\MySQL Server 5.0 is replaced with the installation path to the MySQL Server. The --defaults-file option instructs the MySQL server to read the specified file for configuration options when it starts. Apart from making changes to the my.ini file by running the MySQL Server Configuration Wizard again, you can modify it by opening it with a text editor and making any necessary changes. You can also modify the server configuration with the MySQL Administrator (http://www.mysql.com/products/administrator/) utility. For more information about server configuration, see Section 5.1.2, "Command Options." MySQL clients and utilities such as the mysql and mysqldump command-line clients are not able to 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 Windows installation directory (for example, C:\WINDOWS). Under Windows Server 2003, Windows Server 2000 and Windows XP, MySQL Server Configuration Wizard will configure MySQL to work as a Windows service. To start and stop MySQL you use the Services application that is supplied as part of the Windows Administrator Tools. 2.4.8.4.2. Choosing a Maintenance Option If the MySQL Server Configuration Wizard detects an existing configuration file, you have the option of either reconfiguring your existing server, or removing the server instance by deleting the configuration file and stopping and removing the MySQL service. To reconfigure an existing server, choose the Re-configure Instance option and click the Next button. Any existing configuration file is not overwritten, but renamed (within the same directory) using a timestamp (Windows) or sequential number (Linux). 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. The MySQL Server Configuration Wizard stops and removes the MySQL service, and then deletes the configuration file. The server installation and its data folder are not removed. If you choose the Re-configure Instance option, you advance to the Configuration Type dialog where you can choose the type of installation that you wish to configure. 2.4.8.4.3. Choosing a Configuration Type When you start the MySQL Server 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. MySQL Server Configuration Wizard: Configuration Type 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 many decisions about server configuration. The Detailed Configuration option is intended for advanced users who want more fine-grained control over server configuration. If you are new to MySQL and need a server configured as a single-user developer machine, the Standard Configuration should suit your needs. Choosing the Standard Configuration option causes the MySQL Configuration Wizard to set all configuration options automatically with the exception of 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 in Section 2.4.8.4.10, "The Service Options Dialog," and Section 2.4.8.4.11, "The Security Options Dialog," respectively. 2.4.8.4.4. The Server Type Dialog There are three different server types available to choose from. The server type that you choose affects the decisions that the MySQL Server Configuration Wizard makes with regard to memory, disk, and processor usage. MySQL Server Configuration Wizard: Server Type * 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 are running. The MySQL server is configured to use minimal system resources. * Server Machine: Choose this option for a server machine where the MySQL server is running alongside other server applications such as FTP, email, and Web servers. The MySQL server is configured to use a moderate 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 are running. The MySQL server is configured to use all available system resources. Note By selecting one of the preconfigured configurations, the values and settings of various options in your my.cnf or my.ini will be altered accordingly. The default values and options as described in the reference manual may therefore be different to the options and values that were created during the execution of the configuration wizard. 2.4.8.4.5. The Database Usage Dialog The Database Usage dialog allows you to indicate the storage engines that you expect to use when creating MySQL tables. The option you choose determines whether the InnoDB storage engine is available and what percentage of the server resources are available to InnoDB. MySQL Server Configuration Wizard: Usage Dialog * Multifunctional Database: This option enables both the InnoDB and MyISAM storage engines and divides resources evenly between the two. This option is recommended for users who use both storage engines on a regular basis. * Transactional Database Only: This option enables both the InnoDB and MyISAM storage engines, but dedicates most server resources to the InnoDB storage engine. This option is recommended for users who use InnoDB almost exclusively and make only minimal use of MyISAM. * Non-Transactional Database Only: This option disables the InnoDB storage engine completely and dedicates all server resources to the MyISAM storage engine. This option is recommended for users who do not use InnoDB. The Configuration Wizard uses a template to generate the server configuration file. The Database Usage dialog sets one of the following option strings: Multifunctional Database: MIXED Transactional Database Only: INNODB Non-Transactional Database Only: MYISAM When these options are processed through the default template (my-template.ini) the result is: Multifunctional Database: default-storage-engine=InnoDB _myisam_pct=50 Transactional Database Only: default-storage-engine=InnoDB _myisam_pct=5 Non-Transactional Database Only: default-storage-engine=MyISAM _myisam_pct=100 skip-innodb The _myisam_pct value is used to calculate the percentage of resources dedicated to MyISAM. The remaining resources are allocated to InnoDB. 2.4.8.4.6. 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 separate location can be desirable if your system has a higher capacity or higher performance storage device available, such as a RAID storage system. MySQL Server Configuration Wizard: InnoDB Data Tablespace 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 must move the existing tablespace files to the new location manually before starting the server. 2.4.8.4.7. The Concurrent Connections Dialog To prevent the server from running out of resources, it is important to limit the number of concurrent connections to the MySQL server that can be established. The Concurrent Connections dialog allows you to choose the expected usage of your server, and sets the limit for concurrent connections accordingly. It is also possible to set the concurrent connection limit manually. MySQL Server Configuration Wizard: Connections * Decision Support (DSS)/OLAP: Choose this option if your server does not require a large number of concurrent connections. The maximum number of connections is set at 100, with an average of 20 concurrent connections assumed. * Online Transaction Processing (OLTP): Choose this option if your server requires a large number of concurrent connections. The maximum number of connections is set at 500. * Manual Setting: Choose this option to set the maximum number of concurrent connections to the server manually. Choose the number of concurrent connections from the drop-down box provided, or enter the maximum number of connections into the drop-down box if the number you desire is not listed. 2.4.8.4.8. The Networking and Strict Mode 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. MySQL Server Configuration Wizard: Network Configuration 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 in use, you are prompted to confirm your choice of port number. Set the Server SQL Mode to either enable or disable strict mode. Enabling strict mode (default) makes MySQL behave more like other database management systems. If you run applications that rely on MySQL's old "forgiving" behavior, make sure to either adapt those applications or to disable strict mode. For more information about strict mode, see Section 5.1.7, "SQL Modes." 2.4.8.4.9. The Character Set Dialog The MySQL server supports multiple character sets and it is possible to set a default server character set that is applied to all tables, columns, and databases unless overridden. Use the Character Set dialog to change the default character set of the MySQL server. MySQL Server Configuration Wizard: Character Set * 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. This is a Unicode character set that can store characters from many different languages. * 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.4.8.4.10. The Service Options Dialog This section does not apply to MySQL Community Server users. On Windows platforms, the MySQL server can be installed as a Windows service. When installed this way, 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 Server Configuration Wizard installs the MySQL server as a service by default, using the service name MySQL. If you do not wish to install the service, uncheck the box next to the Install As Windows Service option. You can change the service name by picking a new service name from the drop-down box provided or by entering a new service name into the drop-down box. Note Service names can include any legal character except forward (/) or backward (\) slashes, and must be less than 256 characters long. Warning If you are installing multiple versions of MySQL onto the same machine, you must choose a different service name for each version that you install. If you do not choose a different service for each installed version then the service manager information will be inconsitent and this will cause problems when you try to uninstall a previous version. If you have already installed multiple versions using the same service name, you must manually edit the contents of the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servicesparameters within the Windows registry to update the association of the service name with the correct server version. Typically, when installing multiple versions you create a service name based on the version information. For example, you might install MySQL 5.x as mysql5, or specific versions such as MySQL 5.0.56 as mysql5056. To install the MySQL server as a service but not have it started automatically at startup, uncheck the box next to the Launch the MySQL Server Automatically option. 2.4.8.4.11. The Security Options Dialog It is strongly recommended that you set a root password for your MySQL server, and the MySQL Server Configuration Wizard requires by default that you do so. If you do not wish to set a root password, uncheck the box next to the Modify Security Settings option. MySQL Server Configuration Wizard: Security To set the root password, enter the desired password into both the New root password and Confirm boxes. If you are reconfiguring an existing server, you 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 increases 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. For this reason, it is not recommended. 2.4.8.4.12. The Confirmation Dialog The final dialog in the MySQL Server 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 Server Configuration Wizard without configuring the server, click the Cancel button. MySQL Server Configuration Wizard: Confirmation After you click the Execute button, the MySQL Server Configuration Wizard performs a series of tasks and displays the progress onscreen as the tasks are performed. The MySQL Server Configuration Wizard first determines 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 then writes these options to the corresponding configuration file. If you chose to create a service for the MySQL server, the MySQL Server Configuration Wizard creates and starts the service. If you are reconfiguring an existing service, the MySQL Server Configuration Wizard restarts the service to apply your configuration changes. If you chose to set a root password, the MySQL Configuration Wizard connects to the server, sets your new root password, and applies any other security settings you may have selected. After the MySQL Server Configuration Wizard has completed its tasks, it displays a summary. Click the Finish button to exit the MySQL Server Configuration Wizard. 2.4.8.5. Installing MySQL from a Noinstall Zip Archive This section does not apply to MySQL Enterprise Server users. Users who are installing from the Noinstall package can use the instructions in this section to manually install MySQL. 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.4.8.6. Extracting the Install Archive This section does not apply to MySQL Enterprise Server users. To install MySQL manually, do the following: 1. If you are upgrading from a previous version please refer to Section 2.4.8.14, "Upgrading MySQL on Windows," before beginning the upgrade process. 2. Make sure that you are logged in as a user with administrator privileges. 3. Choose an installation location. Traditionally, the MySQL server is installed in C:\mysql. The MySQL Installation Wizard installs MySQL under C:\Program Files\MySQL. 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.4.8.7, "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. 2.4.8.7. Creating an Option File If you need to specify startup options when you run the server, you can indicate them on the command line or place them in an option file. For options that are used every time the server starts, you may find it most convenient to use an option file to specify your MySQL configuration. This is particularly true under the following circumstances: * The installation or data directory locations are different from the default locations (C:\Program Files\MySQL\MySQL Server 5.0 and C:\Program Files\MySQL\MySQL Server 5.0\data). * You need to tune the server settings. When the MySQL server starts on Windows, it looks for options in two files: the my.ini file in the Windows directory, and the C:\my.cnf file. The Windows directory typically is named something like C:\WINDOWS. You can determine its exact location from the value of the WINDIR environment variable using the following command: C:\> echo %WINDIR% MySQL looks for options first in the my.ini file, and then in the my.cnf file. However, to avoid confusion, it's best if you use only one file. If your PC uses a boot loader where C: is not the boot drive, your only option is to use the my.ini file. Whichever option file you use, it must be a plain text file. You can also make use of the example option files included with your MySQL distribution; see Section 4.2.3.2.2, "Preconfigured Option Files." An option file can be created and modified with any text editor, such as Notepad. For example, if MySQL is installed in E:\mysql and the data directory is in E:\mydata\data, you can create an option file containing a [mysqld] section to specify values for the basedir and datadir parameters: [mysqld] # set basedir to your installation path basedir=E:/mysql # set datadir to the location of your data directory datadir=E:/mydata/data Note that Windows pathnames are specified in option files using (forward) slashes rather than backslashes. If you do use backslashes, you must double them: [mysqld] # set basedir to your installation path basedir=E:\\mysql # set datadir to the location of your data directory datadir=E:\\mydata\\data On Windows, the MySQL installer places the data directory directly under the directory where you install MySQL. If you would like to use a data directory in a different location, you should copy the entire contents of the data directory to the new location. For example, if MySQL is installed in C:\Program Files\MySQL\MySQL Server 5.0, the data directory is by default in C:\Program Files\MySQL\MySQL Server 5.0\data. If you want to use E:\mydata as the data directory instead, you must do two things: 1. Move the entire data directory and all of its contents from C:\Program Files\MySQL\MySQL Server 5.0\data to E:\mydata. 2. Use a --datadir option to specify the new data directory location each time you start the server. 2.4.8.8. Selecting a MySQL Server Type This section does not apply to MySQL Enterprise Server users. The following table shows the available servers for Windows in MySQL 5.0. Binary Description mysqld-nt Optimized binary with named-pipe support mysqld Optimized binary without named-pipe support mysqld-debug Like mysqld-nt, but compiled with full debugging and automatic memory allocation checking All of the preceding binaries are optimized for modern Intel processors, but should work on any Intel i386-class or higher processor. Each of the servers in a distribution support the same set of storage engines. The SHOW ENGINES statement displays which engines a given server supports. All Windows MySQL 5.0 servers have support for symbolic linking of database directories. MySQL supports TCP/IP on all Windows platforms. MySQL servers on Windows support named pipes as indicated in the following list. However, the default is to use TCP/IP regardless of platform. (Named pipes are slower than TCP/IP in many Windows configurations.) Use of named pipes is subject to these conditions: * Named pipes are enabled only if you start the server with the --enable-named-pipe option. It is necessary to use this option explicitly because some users have experienced problems with shutting down the MySQL server when named pipes were used. * Named-pipe connections are allowed only by the mysqld-nt and mysqld-debug servers. Note Most of the examples in this manual use mysqld as the server name. If you choose to use a different server, such as mysqld-nt, make the appropriate substitutions in the commands that are shown in the examples. 2.4.8.9. Starting the Server for the First Time This section gives a general overview of starting the MySQL server. The following sections provide more specific information for starting the MySQL server from the command line or as a Windows service. The information here applies primarily if you installed MySQL using the Noinstall version, or if you wish to configure and test MySQL manually rather than with the GUI tools. The examples in these sections assume that MySQL is installed under the default location of C:\Program Files\MySQL\MySQL Server 5.0. Adjust the pathnames shown in the examples if you have MySQL installed in a different location. Clients have two options. They can use TCP/IP, or they can use a named pipe if the server supports named-pipe connections. MySQL for Windows also supports shared-memory connections if the server is started with the --shared-memory option. Clients can connect through shared memory by using the --protocol=MEMORY option. For information about which server binary to run, see Section 2.4.8.8, "Selecting a MySQL Server Type." Testing is best done from a command prompt in a console window (or "DOS window"). In this way you can have the server display status messages in the window where they are easy to see. If something is wrong with your configuration, these messages make it easier for you to identify and fix any problems. To start the server, enter this command: C:\> "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld" --console For a server that includes InnoDB support, you should see the messages similar to those following as it starts (the pathnames and sizes may differ): InnoDB: The first specified datafile c:\ibdata\ibdata1 did not exist: InnoDB: a new database to be created! InnoDB: Setting file c:\ibdata\ibdata1 size to 209715200 InnoDB: Database physically writes the file full: wait... InnoDB: Log file c:\iblogs\ib_logfile0 did not exist: new to be creat ed InnoDB: Setting log file c:\iblogs\ib_logfile0 size to 31457280 InnoDB: Log file c:\iblogs\ib_logfile1 did not exist: new to be creat ed InnoDB: Setting log file c:\iblogs\ib_logfile1 size to 31457280 InnoDB: Log file c:\iblogs\ib_logfile2 did not exist: new to be creat ed InnoDB: Setting log file c:\iblogs\ib_logfile2 size to 31457280 InnoDB: Doublewrite buffer not found: creating new InnoDB: Doublewrite buffer created InnoDB: creating foreign key constraint system tables InnoDB: foreign key constraint system tables created 011024 10:58:25 InnoDB: Started When the server finishes its startup sequence, you should see something like this, which indicates that the server is ready to service client connections: mysqld: ready for connections Version: '5.0.68' socket: '' port: 3306 The server continues to write to the console any further diagnostic output it produces. You can open a new console window in which to run client programs. If you omit the --console option, the server writes diagnostic output to the error log in the data directory (C:\Program Files\MySQL\MySQL Server 5.0\data by default). The error log is the file with the .err extension. Note The accounts that are listed in the MySQL grant tables initially have no passwords. After starting the server, you should set up passwords for them using the instructions in Section 2.4.16, "Post-Installation Setup and Testing." 2.4.8.10. Starting MySQL from the Windows Command Line The MySQL server can be started manually from the command line. This can be done on any version of Windows. To start the mysqld server from the command line, you should start a console window (or "DOS window") and enter this command: C:\> "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld" The path to mysqld may vary depending on the install location of MySQL on your system. You can stop the MySQL server by executing this command: C:\> "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqladmin" -u root shutdown Note If the MySQL root user account has a password, you need to invoke mysqladmin with the -p option and supply the password when prompted. This command invokes the MySQL administrative utility mysqladmin to connect to the server and tell it to shut down. The command connects as the MySQL root user, which is the default administrative account in the MySQL grant system. Note that users in the MySQL grant system are wholly independent from any login users under Windows. If mysqld doesn't start, check the error log to see whether the server wrote any messages there to indicate the cause of the problem. The error log is located in the C:\Program Files\MySQL\MySQL Server 5.0\data directory. It is the file with a suffix of .err. You can also try to start the server as mysqld --console; in this case, you may get some useful information on the screen that may help solve the problem. The last option is to start mysqld with the --standalone and --debug options. In this case, mysqld writes a log file C:\mysqld.trace that should contain the reason why mysqld doesn't start. See MySQL Internals: Porting (http://forge.mysql.com/wiki/MySQL_Internals_Porting). Use mysqld --verbose --help to display all the options that mysqld understands. 2.4.8.11. Starting MySQL as a Windows Service On Windows, the recommended way to run MySQL is to install it as a Windows service, whereby MySQL starts and stops automatically when Windows starts and stops. A MySQL server installed as a service can also be controlled from the command line using NET commands, or with the graphical Services utility. Generally, to install MySQL as a Windows service you should be logged in using an account that has administrator rights. The Services utility (the Windows Service Control Manager) can be found in the Windows Control Panel (under Administrative Tools on Windows 2000, XP, Vista, and Server 2003). To avoid conflicts, it is advisable to close the Services utility while performing server installation or removal operations from the command line. Before installing MySQL as a Windows service, you should first stop the current server if it is running by using the following command: C:\> "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqladmin" -u root shutdown Note If the MySQL root user account has a password, you need to invoke mysqladmin with the -p option and supply the password when prompted. This command invokes the MySQL administrative utility mysqladmin to connect to the server and tell it to shut down. The command connects as the MySQL root user, which is the default administrative account in the MySQL grant system. Note that users in the MySQL grant system are wholly independent from any login users under Windows. Install the server as a service using this command: C:\> "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld" --install The service-installation command does not start the server. Instructions for that are given later in this section. To make it easier to invoke MySQL programs, you can add the pathname of the MySQL bin directory to your Windows system PATH environment variable: * On the Windows desktop, right-click on the My Computer icon, and select Properties * Next select the Advanced tab from the System Properties menu that appears, and click the Environment Variables button. * Under System Variables, select Path, and then click the Edit button. The Edit System Variable dialogue should appear. * Place your cursor at the end of the text appearing in the space marked Variable Value. (Use the End key to ensure that your cursor is positioned at the very end of the text in this space.) Then enter the complete pathname of your MySQL bin directory (for example, C:\Program Files\MySQL\MySQL Server 5.0\bin), Note that there should be a semicolon separating this path from any values present in this field. Dismiss this dialogue, and each dialogue in turn, by clicking OK until all of the dialogues that were opened have been dismissed. You should now be able to invoke any MySQL executable program by typing its name at the DOS prompt from any directory on the system, without having to supply the path. This includes the servers, the mysql client, and all MySQL command-line utilities such as mysqladmin and mysqldump. You should not add the MySQL bin directory to your Windows PATH if you are running multiple MySQL servers on the same machine. Warning You must exercise great care when editing your system PATH by hand; accidental deletion or modification of any portion of the existing PATH value can leave you with a malfunctioning or even unusable system. The following additional arguments can be used in MySQL 5.0 when installing the service: * You can specify a service name immediately following the --install option. The default service name is MySQL. * If a service name is given, it can be followed by a single option. By convention, this should be --defaults-file=file_name to specify the name of an option file from which the server should read options when it starts. The use of a single option other than --defaults-file is possible but discouraged. --defaults-file is more flexible because it enables you to specify multiple startup options for the server by placing them in the named option file. Also, in MySQL 5.0, use of an option different from --defaults-file is not supported until 5.0.3. * As of MySQL 5.0.1, you can also specify a --local-service option following the service name. This causes the server to run using the LocalService Windows account that has limited system privileges. This account is available only for Windows XP or newer. If both --defaults-file and --local-service are given following the service name, they can be in any order. For a MySQL server that is installed as a Windows service, the following rules determine the service name and option files that the server uses: * If the service-installation command specifies no service name or the default service name (MySQL) following the --install option, the server uses the a service name of MySQL and reads options from the [mysqld] group in the standard option files. * If the service-installation command specifies a service name other than MySQL following the --install option, the server uses that service name. It reads options from the [mysqld] group and the group that has the same name as the service in the standard option files. This allows you to use the [mysqld] group for options that should be used by all MySQL services, and an option group with the service name for use by the server installed with that service name. * If the service-installation command specifies a --defaults-file option after the service name, the server reads options only from the [mysqld] group of the named file and ignores the standard option files. As a more complex example, consider the following command: C:\> "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld" --install MySQL --defaults-file=C:\my-opts.cnf Here, the default service name (MySQL) is given after the --install option. If no --defaults-file option had been given, this command would have the effect of causing the server to read the [mysqld] group from the standard option files. However, because the --defaults-file option is present, the server reads options from the [mysqld] option group, and only from the named file. You can also specify options as Start parameters in the Windows Services utility before you start the MySQL service. Once a MySQL server has been installed as a service, Windows starts the service automatically whenever Windows starts. The service also can be started immediately from the Services utility, or by using a NET START MySQL command. The NET command is not case sensitive. When run as a service, mysqld has no access to a console window, so no messages can be seen there. If mysqld does not start, check the error log to see whether the server wrote any messages there to indicate the cause of the problem. The error log is located in the MySQL data directory (for example, C:\Program Files\MySQL\MySQL Server 5.0\data). It is the file with a suffix of .err. When a MySQL server has been installed as a service, and the service is running, Windows stops the service automatically when Windows shuts down. The server also can be stopped manually by using the Services utility, the NET STOP MySQL command, or the mysqladmin shutdown command. You also have the choice of installing the server as a manual service if you do not wish for the service to be started automatically during the boot process. To do this, use the --install-manual option rather than the --install option: C:\> "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld" --install-m anual To remove a server that is installed as a service, first stop it if it is running by executing NET STOP MySQL. Then use the --remove option to remove it: C:\> "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld" --remove If mysqld is not running as a service, you can start it from the command line. For instructions, see Section 2.4.8.10, "Starting MySQL from the Windows Command Line." Please see Section 2.4.8.13, "Troubleshooting a MySQL Installation Under Windows," if you encounter difficulties during installation. 2.4.8.12. Testing The MySQL Installation You can test whether the MySQL server is working by executing any of the following commands: C:\> "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqlshow" C:\> "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqlshow" -u root mysql C:\> "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqladmin" version status proc C:\> "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysql" test If mysqld is slow to respond to TCP/IP connections from client programs, there is probably a problem with your DNS. In this case, start mysqld with the --skip-name-resolve option and use only localhost and IP numbers in the Host column of the MySQL grant tables. You can force a MySQL client to use a named-pipe connection rather than TCP/IP by specifying the --pipe or --protocol=PIPE option, or by specifying . (period) as the host name. Use the --socket option to specify the name of the pipe if you do not want to use the default pipe name. Note that if you have set a password for the root account, deleted the anonymous account, or created a new user account, then you must use the appropriate -u and -p options with the commands shown above in order to connect with the MySQL Server. See Section 4.2.2, "Connecting to the MySQL Server." For more information about mysqlshow, see Section 4.5.6, "mysqlshow --- Display Database, Table, and Column Information." 2.4.8.13. Troubleshooting a MySQL Installation Under Windows When installing and running MySQL for the first time, you may encounter certain errors that prevent the MySQL server from starting. The purpose of this section is to help you diagnose and correct some of these errors. Your first resource when troubleshooting server issues is the error log. The MySQL server uses the error log to record information relevant to the error that prevents the server from starting. The error log is located in the data directory specified in your my.ini file. The default data directory location is C:\Program Files\MySQL\MySQL Server 5.0\data. See Section 5.2.1, "The Error Log." Another source of information regarding possible errors is the console messages displayed when the MySQL service is starting. Use the NET START MySQL command from the command line after installing mysqld as a service to see any error messages regarding the starting of the MySQL server as a service. See Section 2.4.8.11, "Starting MySQL as a Windows Service." The following examples show other common error messages you may encounter when installing MySQL and starting the server for the first time: * If the MySQL server cannot find the mysql privileges database or other critical files, you may see these messages: System error 1067 has occurred. Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist These messages often occur when the MySQL base or data directories are installed in different locations than the default locations (C:\Program Files\MySQL\MySQL Server 5.0 and C:\Program Files\MySQL\MySQL Server 5.0\data, respectively). This situation may occur when MySQL is upgraded and installed to a new location, but the configuration file is not updated to reflect the new location. In addition, there may be old and new configuration files that conflict. Be sure to delete or rename any old configuration files when upgrading MySQL. If you have installed MySQL to a directory other than C:\Program Files\MySQL\MySQL Server 5.0, you need to ensure that the MySQL server is aware of this through the use of a configuration (my.ini) file. The my.ini file needs to be located in your Windows directory, typically C:\WINDOWS. You can determine its exact location from the value of the WINDIR environment variable by issuing the following command from the command prompt: C:\> echo %WINDIR% An option file can be created and modified with any text editor, such as Notepad. For example, if MySQL is installed in E:\mysql and the data directory is D:\MySQLdata, you can create the option file and set up a [mysqld] section to specify values for the basedir and datadir parameters: [mysqld] # set basedir to your installation path basedir=E:/mysql # set datadir to the location of your data directory datadir=D:/MySQLdata Note that Windows pathnames are specified in option files using (forward) slashes rather than backslashes. If you do use backslashes, you must double them: [mysqld] # set basedir to your installation path basedir=C:\\Program Files\\MySQL\\MySQL Server 5.0 # set datadir to the location of your data directory datadir=D:\\MySQLdata MySQL Enterprise For expert advice on the start-up options appropriate to your circumstances, subscribe to the MySQL Enterprise Monitor. For more information, see http://www.mysql.com/products/enterprise/advisors.html. If you change the datadir value in your MySQL configuration file, you must move the contents of the existing MySQL data directory before restarting the MySQL server. See Section 2.4.8.7, "Creating an Option File." * If you reinstall or upgrade MySQL without first stopping and removing the existing MySQL service and install MySQL using the MySQL Configuration Wizard, you may see this error: Error: Cannot create Windows service for MySql. Error: 0 This occurs when the Configuration Wizard tries to install the service and finds an existing service with the same name. One solution to this problem is to choose a service name other than mysql when using the configuration wizard. This allows the new service to be installed correctly, but leaves the outdated service in place. Although this is harmless, it is best to remove old services that are no longer in use. To permanently remove the old mysql service, execute the following command as a user with administrative privileges, on the command-line: C:\> sc delete mysql [SC] DeleteService SUCCESS If the sc utility is not available for your version of Windows, download the delsrv utility from http://www.microsoft.com/windows2000/techinfo/reskit/tools/exi sting/delsrv-o.asp and use the delsrv mysql syntax. 2.4.8.14. Upgrading MySQL on Windows This section does not apply to MySQL Enterprise Server users. This section lists some of the steps you should take when upgrading MySQL on Windows. 1. Review Section 2.4.17, "Upgrading MySQL," for additional information on upgrading MySQL that is not specific to Windows. 2. You should always back up your current MySQL installation before performing an upgrade. See Section 6.1, "Database Backups." 3. Download the latest Windows distribution of MySQL from http://dev.mysql.com/downloads/. 4. Before upgrading MySQL, you must stop the server. If the server is installed as a service, stop the service with the following command from the command prompt: C:\> NET STOP MySQL If you are not running the MySQL server as a service, use the following command to stop it: C:\> "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqladmin" -u root shutdown Note If the MySQL root user account has a password, you need to invoke mysqladmin with the -p option and supply the password when prompted. 5. When upgrading to MySQL 5.0 from a version previous to 4.1.5, or when upgrading from a version of MySQL installed from a Zip archive to a version of MySQL installed with the MySQL Installation Wizard, you must manually remove the previous installation and MySQL service (if the server is installed as a service). To remove the MySQL service, use the following command: C:\> C:\mysql\bin\mysqld --remove If you do not remove the existing service, the MySQL Installation Wizard may fail to properly install the new MySQL service. 6. If you are using the MySQL Installation Wizard, start the wizard as described in Section 2.4.8.3, "Using the MySQL Installation Wizard." 7. If you are installing MySQL from a Zip archive, extract the archive. You may either overwrite your existing MySQL installation (usually located at C:\mysql), or install it into a different directory, such as C:\mysql5. Overwriting the existing installation is recommended. 8. If you were running MySQL as a Windows service and you had to remove the service earlier in this procedure, reinstall the service. (See Section 2.4.8.11, "Starting MySQL as a Windows Service.") 9. Restart the server. For example, use NET START MySQL if you run MySQL as a service, or invoke mysqld directly otherwise. 10. If you encounter errors, see Section 2.4.8.13, "Troubleshooting a MySQL Installation Under Windows." 2.4.8.15. MySQL on Windows Compared to MySQL on Unix MySQL for Windows has proven itself to be very stable. The Windows version of MySQL has the same features as the corresponding Unix version, with the following exceptions: * Limited number of ports Windows systems have about 4,000 ports available for client connections, and after a connection on a port closes, it takes two to four minutes before the port can be reused. In situations where clients connect to and disconnect from the server at a high rate, it is possible for all available ports to be used up before closed ports become available again. If this happens, the MySQL server appears to be unresponsive even though it is running. Note that ports may be used by other applications running on the machine as well, in which case the number of ports available to MySQL is lower. For more information about this problem, see http://support.microsoft.com/default.aspx?scid=kb;en-us;196271 . * Concurrent reads MySQL depends on the pread() and pwrite() system calls to be able to mix INSERT and SELECT. Currently, we use mutexes to emulate pread() and pwrite(). We intend to replace the file level interface with a virtual interface in the future so that we can use the readfile()/writefile() interface to get more speed. The current implementation limits the number of open files that MySQL 5.0 can use to 2,048, which means that you cannot run as many concurrent threads on Windows as on Unix. * Blocking read MySQL uses a blocking read for each connection. That has the following implications if named-pipe connections are enabled: + A connection is not disconnected automatically after eight hours, as happens with the Unix version of MySQL. + If a connection hangs, it is not possible to break it without killing MySQL. + mysqladmin kill does not work on a sleeping connection. + mysqladmin shutdown cannot abort as long as there are sleeping connections. We plan to fix this problem in the future. * ALTER TABLE While you are executing an ALTER TABLE statement, the table is locked from being used by other threads. This has to do with the fact that on Windows, you can't delete a file that is in use by another thread. In the future, we may find some way to work around this problem. * DROP TABLE DROP TABLE on a table that is in use by a MERGE table does not work on Windows because the MERGE handler does the table mapping hidden from the upper layer of MySQL. Because Windows does not allow dropping files that are open, you first must flush all MERGE tables (with FLUSH TABLES) or drop the MERGE table before dropping the table. * DATA DIRECTORY and INDEX DIRECTORY The DATA DIRECTORY and INDEX DIRECTORY options for CREATE TABLE are ignored on Windows, because Windows doesn't support symbolic links. These options also are ignored on systems that have a