Chapter 2. Installing and Upgrading MySQL

Table of Contents

2.1. MySQL Installation Overview
2.2. Determining your current MySQL version
2.3. Installing MySQL Enterprise
2.3.1. Overview of MySQL Enterprise Installation
2.3.2. Enterprise Server Distribution Types
2.3.3. MySQL Enterprise Contents
2.3.4. Running the Enterprise Installer
2.3.5. Post-Install Procedures
2.3.6. MySQL Server Configuration Wizard
2.3.7. MySQL Network Service Agent
2.3.8. Upgrading MySQL Enterprise Server
2.3.9. Uninstalling MySQL Enterprise
2.3.10. Enterprise Server Default Configuration
2.4. Installing MySQL Community Server
2.4.1. Overview of MySQL Community Server Installation
2.4.2. Operating Systems Supported by MySQL Community Server
2.4.3. Choosing Which MySQL Distribution to Install
2.4.4. How to Get MySQL
2.4.5. Verifying Package Integrity Using MD5 Checksums or GnuPG
2.4.6. Installation Layouts
2.4.7. Standard MySQL Installation Using a Binary Distribution
2.4.8. Installing MySQL on Windows
2.4.9. Installing MySQL on Linux
2.4.10. Installing MySQL on Mac OS X
2.4.11. Installing MySQL on Solaris
2.4.12. Installing MySQL on NetWare
2.4.13. Installing MySQL on Other Unix-Like Systems
2.4.14. MySQL Installation Using a Source Distribution
2.4.15. Post-Installation Setup and Testing
2.4.16. Upgrading MySQL
2.4.17. Downgrading MySQL
2.4.18. Operating System-Specific Notes
2.4.19. Perl Installation Notes

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:

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.16, “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.9, “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 that you are connected to will be shown once you are connected. The server version information will include 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 (GPL)
    
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    
    mysql>

    Below is 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.
    
    mysql> 
  • You may also determine the version information using the version variables. Both the version and version_comment variables contain version information for the server you are connected to. Use the SHOW VARIABLES statement to obtain the information you want. For 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)
    
    mysql> 
  • The STATUS command will display the version and version comment information. For example:

    mysql> status;
    --------------
    ./client/mysql  Ver 14.12 Distrib 5.0.29, for pc-linux-gnu (i686) using 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 - Standard (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
    --------------
    
  • MySQL Administrator will show the server version within the Server Information tab. Only the value of the version information is shown.

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

This section does not apply to MySQL Community Server users.

To obtain MySQL Enterprise, 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.

To install MySQL Enterprise, install the main distribution plus the latest available service pack or hot-fix. You only need to install the latest service pack or hot-fix – this will include all updates since the previous main distribution release Enterprise Installer. For platforms that do not yet have an Enterprise Installer, use the Community Server instructions (see Section 2.4, “Installing MySQL Community Server”).

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.

Some packages include additional servers that are built with debugging support but are otherwise configured identically to the non-debug servers. Eventually, all packages will include them.

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.

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. MySQL Enterprise Contents

This section does not apply to MySQL Community Server users.

MySQL Enterprise consists of the MySQL Enterprise Server and MySQL Network, which contains the Monitoring and Advisory Service, access to the Knowledge Base, and more. The MySQL Enterprise Installer provides a single installation package that can install MySQL Enterprise, and a number of additional components including the MySQL Connectors and MySQL Documentation in a number of different formats.

The full list of components provided by the MySQL Enterprise Installer is as follows:

  • MySQL Enterprise Server, incorporating:

    • MySQL Database Server (mysqld)

    • MySQL command-line tools and utilities

    • Developer components (including the MySQL Client Library for use with third party tools and connectors; and the API for C/C++ developers)

  • MySQL Network Service Agent

  • MySQL GUI Tools, incorporating:

    • MySQL Administrator

    • MySQL Query Browser

    • MySQL Workbench

    • MySQL Migration Toolkit (Windows only)

  • MySQL Connectors, including:

    • MySQL Connector/J — a JDBC compliant Java interface

    • MySQL Connector/ODBC — an ODBC driver

    • MySQL Connector/NET — an ADO.NET compatible driver for the .NET environment and languages

  • MySQL Documentation, incorporating the documentation for the server, command line tools and connectors.

Enterprise Installers are currently available for the following platforms:

  • Windows x86 (including Windows 2000, Windows XP and Windows Server 2003)

  • SuSE Linux x86 and X64

  • RedHat Enterprise Linux 4 x86 and X64

2.3.4. Running the Enterprise Installer

This section does not apply to MySQL Community Server users.

MySQL Enterprise includes an installer for supported platforms that will guide you through the installation process for all the components of MySQL Enterprise.

2.3.4.1. Using the Enterprise Installer for Windows

The Enterprise Installer for Windows provides both background information on MySQL and links to the MySQL Web site and documentation. The installer can be used to add any of the MySQL Enterprise components to your Microsoft Windows 2000, Windows XP or Windows Server 2003 computers.

To start the installation process:

Double click on the mysql-enterprise-VERSION-win32.exe installer application, where VERSION is the version number of the release you are installing. For example, mysql-enterprise-5.0.26-win32.exe. There may be a slight pause before the installer shows the first stage of the installation process as the installer extracts some components.

MySQL Enterprise Installer Main Screen
          (Windows)

2.3.4.2. Using the Enterprise Installer for Linux

This section does not apply to MySQL Community Server users.

The Enterprise Installer for Linux is available for a number of different platforms. The installer is an executable component that provides a GUI interface (using the X Windows System) to the installation process using the native package management format (for example RPM). Alternatively, you may install the RPMs individually from the command line.

To use the Linux Enterprise Installer:

  • You must be logged in as root (superuser). If you are not logged in as root, you will be able to run the installer, but the installation process will fail.

  • You must have access to a system running the X Window System (X11). The system on which you are running the installer, and the system where the installer interface is executing do not need to be the same. The installer is self-contained; the window manager and libraries that are installed on your system should not affect your ability to run the installer. For details on remote installation, see below.

  • The installer must be executed on the system on which you want to install MySQL Enterprise.

To start the installer, extract the installation package:

shell> bunzip2 
    mysql-enterprise-VERSION.PLATFORM.x86_64.tar.bz
shell> tar xf mysql-enterprise-VERSION.PLATFORM.x86_64.tar

VERSION is the version number of the MySQL Enterprise release that you are installing; PLATFORM is the name of the supported platform, for example rhel4 for RedHat Enterprise Linux v4.

The installer and packages can be located in the sub directory created when the files were extracted. You should change to this directory and then run the

shell> cd mysql-enterprise-VERSION
shell> ./installer

To the run the installer on the target machine, with the installer display being provided on a different on a different X11 server, set the DISPLAY environment variable:

shell> DISPLAY=remote:0.0 ./installer

You should replace the remote:0.0 with the hostname and display/screen number for the display you are using.

Once started, you will be presented with the main installer window, as shown below. Note that the format of this window may differ depending on the window manager (KDE, Gnome, etc.) that you might have installed.

MySQL Enterprise Installer Main Screen
          (Linux)

To install from directly from the RPMs without using the installer, change to the packages directory within the main MySQL Enterprise installer directory and type:

shell> rpm -iv mysql-*.rpm

If you upgrading from a previous version of any of these packages, use:

shell> rpm -Uv mysql-*.rpm

2.3.4.3. Choosing What to Install

This section does not apply to MySQL Community Server users.

Whether you are running the Enterprise Installer under Windows or Linux, the basic interface and options available to you are the same. Initially, you will be offered three choices:

  • Preparation — this section of the installer enables you to examine the hardware and software requirements of MySQL Enterprise before you start the installation process. Please read this information carefully.

    MySQL Enterprise Installer System
              Requirements

    Release notes provide information on the changes, bug fixes, and issues within the corresponding release. Please note that release notes in this section of the installer are currently provided only for the MySQL server component. You should read this information carefully, as the notes provided will list the bug fixes and major functionality changes that affect this release. You should ensure that these will not affect your existing installation before continuing the installation process. For information on all releases, different release types, and schedules, please see Appendix D, MySQL Enterprise Release Notes.

    For information on the changes in MySQL Network Monitoring and Advisory Service, the MySQL GUI Tools and Connectors, please see the relevant section of Appendix F, MySQL Change History.

    MySQL Enterprise Installer Release
              Notes
  • Installation — this is the main installation process and interface. A number of options are provided so that you can run choose which components to be installed. For more information, see Section 2.3.4.3.1, “MySQL Enterprise Installation Process”.

  • Other Information — this sections provides links for the MySQL web site and the MySQL Enterprise License Agreement.

If you exit the installer at this stage, using the Exit link, no software will have been installed.

2.3.4.3.1. MySQL Enterprise Installation Process

To install MySQL components, choose option 2 (Installation). The main installation screen enables you to select the type of installation.

MySQL Enterprise Installer Installation
            Types

Four different installation options are available:

  1. Server Default — this installs all of the components required for running a MySQL database server, including the core server application, command line utilities, the MySQL client library, and documentation. The MySQL GUI tools and connectors are not installed with this option.

  2. Client Default — this installs all of the components required for a client to communicate with a MySQL database server. This includes the MySQL client library, GUI tools, connectors, and documentation.

  3. Full — this installs all the available components, including MySQL database server, client library, GUI tools, connectors, and documentation.

  4. Custom — this option enables you to select the individual components to be installed. You can choose not only the major groups (for example MySQL database server) but also individual subcomponents (command-line utilities). You will need to select the individual components that you want to install.

    MySQL Enterprise Installer Custom
                Installation

These options are summarized in the table below.

ComponentServer DefaultClient DefaultFullCustom
MySQL ServerYesNoYesOptional
Client LibraryYesYesYesOptional
GUI ToolsNoYesYesOptional
ConnectorsNoYesYesOptional
DocumentationYesYesYesOptional

MySQL Network Service Agent

The MySQL Network Service Agent can be installed by selecting the appropriate option when the installation process for the main components has been completed.

You must have a MySQL Network Monitoring and Advisory Service Network Manager already installed and running on your network to use the Service Agent. You will need the MySQL Agent URL to complete the configuration process.

Once you have selected the type of installation, or selected the individual components to be installed if you have selected the Custom installation type, the installation process will start to copy the files, applications and other components to your machine.

MySQL Enterprise Installer Installation
            Progress

The installation process will take some time, with the exact period depending on the features and options that you have selected to install.

Once the process has completed, you will need to click Next to complete the post-installation process. You can choose to automatically execute the MySQL Server Configuration Wizard (which provides an interface for configuring the parameters of your MySQL Server installation) and the MySQL Network Monitoring and Advisory Service Installer.

MySQL Enterprise Installer
            Post-Installation Tasks

To complete the installation sequence and execute the optional post-installation processes, click Finish.

2.3.5. Post-Install Procedures

This section does not apply to MySQL Community Server users.

After installation, depending on the options you selected on the final screen, you may be asked to complete the MySQL Server Configuration Wizard and/or the MySQL Network Service Agent installer.

2.3.6. 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.8, “How to Report Bugs or Problems”.

2.3.6.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.

MySQL Server Configuration Wizard
2.3.6.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 utility. For more information about server configuration, see Section 5.2.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 or C:\WINNT).

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.3.6.1.2. Starting the MySQL Server Configuration Wizard on Linux

This section does not apply to MySQL Community Server users.

To start the MySQL Configuration Wizard on Linux, you must run the mysqlsetup command. You must be running an X Windows System server for the MySQL Server Configuration Wizard.

To display the MySQL Server Configuration Wizard interface on a different machine, set the value of the DISPLAY variable on the command line:

shell>
DISPLAY=remote:0.0 mysqlsetup

The MySQL Server Configuration Wizard places the my.cnf file in the /etc directory.

This configuration file is automatically used when mysqld is started. The standard MySQL server initialization script, typically located within /etc/init.d/mysql, will also use this file automatically.

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 utility. For more information about server configuration, see Section 5.2.2, “Command Options”.

2.3.6.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.3.6.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.3.6.10, “The Service Options Dialog”, and Section 2.3.6.11, “The Security Options Dialog”, respectively.

2.3.6.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.3.6.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.

2.3.6.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.3.6.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.3.6.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.2.6, “SQL Modes”.

2.3.6.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.3.6.10. The Service Options Dialog

This section does not apply to MySQL Community Server users.

On Windows NT-based 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.

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.3.6.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.3.6.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.3.7. MySQL Network Service Agent

This section does not apply to MySQL Community Server users.

The MySQL Network Service Agent provides information to a MySQL Network Monitoring and Advisory Service Network Monitor about the health and statistics of your MySQL server. In order to use the service agent, you must have an instance of the MySQL Network Monitor installed. You will need the URL, including login and password, of the MySQL Network Monitor to complete this installation.

If you have selected that the MySQL Network Service Agent be installed automatically, you should follow the instructions below to install and configure the agent for your machine.

Note

In the example screen shots below, the Linux version of the installer is shown. The basic process is identical for all platforms.

  1. The MySQL Network Service Agent should start automatically. Click Forward or Next to start the installation process.

    MySQL Network Service Agent:
            Initial
  2. Choose an installation path for the MySQL Network Service Agent. This directory will contain the agent application and required components for the operation of the agent. You will need to know the location of this directory so that you can start and stop the agent when required.

    The default location under Linux is within the /opt directory; under Windows the default location is within the main MySQL installation directory (for example, C:\Program Files\MySQL\MySQLNetwork\Agent).

    MySQL Network Service Agent: Installation
            path

    Click Forward or Next to continue the installation process.

  3. Enter the IP address or hostname of the MySQL server you want to monitor. By default, the localhost address (127.0.0.1) is used. This default value should be correct when MySQL Network Service Agent is installed as part of MySQL Enterprise, as you will be monitoring the local instance of the server. If you want validate the hostname or IP address, click the Yes radio button; otherwise, click the No button. If you have selected to validate the address then any problems be notified when you click Forward.

    MySQL Network Service Agent: MySQL
            hostname

    Click Forward or Next to continue the installation process.

  4. Enter the port number of the MySQL server that you want to monitor. The default value, 3306, should be correct unless you have altered the default value when running the MySQL Configuration Wizard during the installation of MySQL Enterprise.

    MySQL Network Service Agent: MySQL
            port

    Click Forward or Next to continue the installation process.

  5. Enter the user name the agent will use to connect to the server. You may use any user that has been configured on the MySQL server. You can even use the root password; however, the information will be stored within a standard text file in an unencrypted form. If you created an anonymous user during the Configuration Wizard process, you may use this user instead.

    MySQL Network Service Agent: MySQL user
            name

    Click Forward or Next to continue the installation process.

  6. Enter the password for the user you selected in the previous step. You must enter the password twice to confirm the password.

    MySQL Network Service Agent: MySQL user
            password

    Click Forward or Next to continue the installation process.

  7. Enter the host name of the machine that is running the MySQL Network Service Manager. You can locate this information in the configuration_report.txt file that was created when the MySQL Network Service Manager was installed. This file will be located in the directory where the MySQL Network Service Manager was installed, typically /opt/mysqlnetwork-VERSION (Linux) or C:\Program Files\MySQL\Network.

    MySQL Network Service Agent: MySQL Network
            Service Manager hostname

    Click Forward or Next to continue the installation process.

  8. Enter the port number for the MySQL Network Service Manager.

    MySQL Network Service Agent: MySQL Network
            Service Manager port number

    Click Forward or Next to continue the installation process.

  9. Enter the user name the agent will use to connect to the MySQL Network Service Manager.

    MySQL Network Service Agent: MySQL Network
            Service Manager

    Click Forward or Next to continue the installation process.

  10. Enter the password required to connect to the MySQL Network Service Manager.

    MySQL Network Service Agent: MySQL Network
            Service Manager password

    Click Forward or Next to continue the installation process.

  11. Enter the hostname that will be used to identify this MySQL server within the MySQL Network Service Manager.

    MySQL Network Service Agent: MySQL Service
            Agent hostname

    Click Forward or Next to continue the installation process.

  12. Select the logging level to be used when reporting information to the MySQL Network Service Manager.

    MySQL Network Service Agent: Logging
            level

    Click Forward or Next to continue the installation process.

  13. You are now ready to install the MySQL Service Agent. If you need to change any of the settings, use the Back button to go back to the configuration option you want to modify.

    Linux only: Before installation is started, you will be shown the process required to start the MySQL Agent. Make a note of this information, as you will need this to start the agent once it has been installed.

    MySQL Network Service Agent: Agent
            info

    Click Forward or Next to continue the installation process.

  14. The installation process will start. It may take a few minutes to complete the installation of the MySQL Network Service Agent and configure the agent for your system.

    Click Forward or Nextto continue the installation process.

  15. Once the process has been completed, click Finish to complete the installation and exit the installer.

For more information on the MySQL Network Monitoring and Advisory Service, see the corresponding documentation installed with MySQL Enterprise.

2.3.8. 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 D, 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 F, MySQL Change History.

You should also review the notes and advice contained within Section 2.4.16, “Upgrading MySQL”.

2.3.9. 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.9.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.9.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.3.10. Enterprise Server Default Configuration

This section does not apply to MySQL Community Server users.

The default configuration parameters for Enterprise Server are shown in the following table. For more information on setting parameters for MySQL, see Chapter 5, Database Administration.

ParameterDefault value
innodb_additional_mem_pool_size8MB
Innodb_buffer_pool_size40MB
innodb_log_buffer_size 8MB
innodb_log_file_size50MB
key_buffer_size40MB
log_slow_queries1
long_query_time 1
max_connections 200
myisam_sort_buffer_size40MB
query_cache_size20MB
sort_buffer_size1MB
sql_modestrict_trans_tables, no_zero_in_date, no_zero_date,error_for_division_by_zero, no_auto_create_user, real_as_float, ignore_space
table_cache/table_open_cache512
table_definition_cache512
thread_cache100

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. Please note that not all platforms are equally suitable for running MySQL, and that not all platforms on which MySQL is known to run are officially supported by 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 several 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 tree for those who want to see our most recent developments and help us test new code. To determine which version and type of distribution you should use, see Section 2.4.3, “Choosing Which MySQL Distribution to Install”.

  3. Download the distribution that you want to install. For 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.14, “MySQL Installation Using a Source Distribution”.

    If you encounter installation difficulties, see Section 2.4.18, “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.15, “Post-Installation Setup and Testing”. This section contains important information about making sure the MySQL server is working properly. It also describes how to secure the initial MySQL user accounts, which have no passwords until you assign passwords. The section applies whether you install MySQL using a binary or source distribution.

  6. If you want to run the MySQL benchmark scripts, Perl support for MySQL must be available. See Section 2.4.19, “Perl Installation Notes”.

The immediately following sections contain the information necessary to choose, download, and verify 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 at Section 2.4.7, “Standard MySQL Installation Using a Binary Distribution”. To build MySQL from source, use the instructions at Section 2.4.14, “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 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.) We use and develop the software ourselves primarily on Linux (SuSE and Red Hat), FreeBSD, and Sun Solaris (versions 8 and 9).

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

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

  • General stability of the thread library. A platform may have an excellent reputation otherwise, but MySQL 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. In other words, when a process creates a thread, it should be possible for that thread to run on a CPU different from the original process.

  • The capability of the kernel and the thread library to run many threads that acquire and release a mutex over a short critical region frequently without excessive context switches. If the implementation of pthread_mutex_lock() is too anxious to yield CPU time, this hurts MySQL tremendously. If this issue is not taken care of, adding extra CPUs actually makes MySQL slower.

  • General filesystem stability and performance.

  • If your tables are large, performance is affected by the ability of the filesystem to deal with large files at all and to deal with them efficiently.

  • Our level of expertise here at MySQL AB with the platform. If we know a platform well, we enable platform-specific optimizations and fixes at compile time. We can also provide advice on configuring your system optimally for MySQL.

  • The amount of testing we have done internally for similar configurations.

  • The number of users that have run MySQL successfully on the platform in similar configurations. If this number is high, the likelihood of encountering platform-specific surprises is much smaller.

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

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

2.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 is the previous stable (production-quality) release series. New releases are issued for critical bugfixes and security fixes. No significant new features are to be added to this series.

  • MySQL 4.0 and 3.23 are the old stable (production-quality) release series. These versions are now retired, so new releases are issued only to fix extremely critical bugs (primarily security issues).

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 BitKeeper 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 F, 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.

    All APIs, externally visible structures, and columns for SQL statements will not 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:

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 two different binary versions. One is compiled with the core feature set. The other (MySQL-Max) is compiled with an extended feature set. Both versions are compiled from the same source distribution. All native MySQL clients can connect to servers from either MySQL version.

    The extended MySQL binary distribution is identified by the -max suffix and is configured with the same options as mysqld-max. See Section 5.3, “The mysqld-max Extended MySQL Server”.

    For RPM distributions, if you want to use the MySQL-Max RPM, you must first install the standard MySQL-server RPM.

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 BitKeeper repositories to have access to all current bugfixes. For example, if you have found a bug and reported it to the MySQL development team, the bugfix 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 F, 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 BitKeeper 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. Release Philosophy—No Known Bugs in Releases

This section does not apply to MySQL Enterprise Server users.

We put considerable time and effort into making our releases bug-free. Our policy is never to release a version of MySQL intended for production use that has any known fatal, repeatable bugs.

We have documented all open problems, bugs, and issues that are dependent on design decisions. See Section B.8, “Known Issues in MySQL”.

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

Here is a description of our build process:

  • We monitor bugs from our customer support list, the bugs database at http://bugs.mysql.com/, and the MySQL external mailing lists.

  • All reported bugs for live versions are entered into the bugs database.

  • When we fix a bug, we always try to make a test case for it and include it into our test system to ensure that the bug can never recur without being detected. (About 90% of all fixed bugs have test cases.)

  • We create test cases for each new feature that we add to MySQL.

  • Before we start to build a new MySQL release, we ensure that all reported repeatable bugs for that MySQL version (3.23.x, 4.0.x, 4.1.x, 5.0.x, 5.1.x, and so on) are fixed. If something is impossible to fix due to some internal design decision in MySQL, we document this in the manual. See Section B.8, “Known Issues in MySQL”.

  • We do a build on all platforms for which we support binaries and run our test suite and benchmark suite on all of them.

  • We do not publish a binary for a platform for which the test or benchmark suite fails. If the problem is due to a general error in the source, we fix it and do the build plus tests on all systems again from scratch.

  • The build and test process takes a week. If we receive a report regarding a fatal bug during this process (for example, one that causes a core dump), we fix the problem and restart the build process.

  • After publishing the binaries on http://dev.mysql.com/, we send out an announcement message to the mysql and announce mailing lists. See Section 1.7.1, “MySQL Mailing Lists”. The announcement message contains a list of all changes to the release and any known problems with the release. The Known Problems section in the release notes has been needed for only a handful of releases.

  • To quickly give our users access to the latest MySQL features, we try to produce a new MySQL release every 4-8 weeks. Source code snapshots are built daily and are available at http://downloads.mysql.com/snapshots.php.

  • If, despite our best efforts, we receive any bug reports after a release is issued that a critical problem exists for the build on a specific platform, we fix it at once and build a new 'a' release for that platform. Thanks to our large user base, problems are found and resolved very quickly.

  • Our track record for making stable releases is quite good. In the last 150 releases, we had to do a new build for fewer than 10 of them. In three of these cases, the bug was a faulty glibc library on one of our build machines that took us a long time to track down.

2.4.3.5. 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 Build-tools/Do-compile, which compiles the source code and creates the binary tar.gz archive using scripts/make_binary_distribution.

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

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.7.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