10bet网址
MySQL 5.6 Reference Manual
Related Documentation Download this Manual Excerpts from this Manual

2.11.8 Upgrading MySQL on Windows

There are two approaches for upgrading MySQL on Windows:

The approach you select depends on how the existing installation was performed. Before proceeding, reviewSection 2.11, “Upgrading MySQL”for additional information on upgrading MySQL that is not specific to Windows.

Note

Whichever approach you choose, always back up your current MySQL installation before performing an upgrade. SeeSection 7.2, “Database Backup Methods”.

Upgrades between milestone releases (or from a milestone release to a GA release) are not supported. Significant development changes take place in milestone releases and you may encounter compatibility issues or problems starting the server. For instructions on how to perform a logical upgrade with a milestone release, seeLogical Upgrade.

Note

MySQL Installer does not support upgrades betweenCommunityreleases andCommercialreleases. If you require this type of upgrade, perform it using theZIP archiveapproach.

Upgrading MySQL with MySQL Installer

Performing an upgrade with MySQL Installer is the best approach when the current server installation was performed with it and the upgrade is within the current release series. MySQL Installer does not support upgrades between release series, such as from 5.5 to 5.6, and it does not provide an upgrade indicator to prompt you to upgrade. For instructions on upgrading between release series, seeUpgrading MySQL Using the Windows ZIP Distribution.

To perform an upgrade using MySQL Installer:

  1. Start MySQL Installer.

  2. From the dashboard, clickCatalogto download the latest changes to the catalog. The installed server can be upgraded only if the dashboard displays an arrow next to the version number of the server.

  3. ClickUpgrade. All products that have a newer version now appear in a list.

    Note

    MySQL Installer deselects the server upgrade option for milestone releases (Pre-Release) in the same release series. In addition, it displays a warning to indicate that the upgrade is not supported, identifies the risks of continuing, and provides a summary of the steps to perform a logical upgrade manually. You can reselect server upgrade and proceed at your own risk.

  4. Deselect all but the MySQL server product, unless you intend to upgrade other products at this time, and clickNext.

  5. ClickExecuteto start the download. When the download finishes, clickNextto begin the upgrade operation.

  6. Configure the server.

Upgrading MySQL Using the Windows ZIP Distribution

To perform an upgrade using the Windows ZIP archive distribution:

  1. Download the latest Windows ZIP Archive distribution of MySQL from//www.delbede.com/downloads/.

  2. If the server is running, stop it. If the server is installed as a service, stop the service with the following command from the command prompt:

    C:\> SC STOPmysqld_service_name

    Alternatively, useNET STOPmysqld_service_name.

    If you are not running the MySQL server as a service, usemysqladminto stop it. For example, before upgrading from MySQL 5.5 to 5.6, usemysqladminfrom MySQL 5.5 as follows:

    C:\> "C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqladmin" -u root shutdown
    Note

    If the MySQLrootuser account has a password, invokemysqladminwith the-poption and enter the password when prompted.

  3. Extract the ZIP archive. You may either overwrite your existing MySQL installation (usually located atC:\mysql), or install it into a different directory, such asC:\mysql5. Overwriting the existing installation is recommended. However, for upgrades (as opposed to installing for the first time), you must remove the data directory from your existing MySQL installation to avoid replacing your current data files. To do so, follow these steps:

    1. Unzip the ZIP archive in some location other than your current MySQL installation.

    2. Remove the data directory.

    3. Move the data directory from the current MySQL installation to the location of the just-removed data directory

    4. Remove the current MySQL installation

    5. Move the unzipped installation to the location of the just-removed installation

  4. Restart the server. For example, use theSC STARTmysqld_service_nameorNET STARTmysqld_service_namecommand if you run MySQL as a service, or invokemysqlddirectly otherwise.

  5. As Administrator, runmysql_upgrade检查表,如果不尝试修理cessary, and update your grant tables if they have changed so that you can take advantage of any new capabilities. SeeSection 4.4.7, “mysql_upgrade — Check and Upgrade MySQL Tables”.

  6. If you encounter errors, seeSection 2.3.5, “Troubleshooting a Microsoft Windows MySQL Server Installation”.