To upgrade MySQL on Windows, follow these steps:
Review Upgrading MySQL, for additional information on upgrading MySQL that is not specific to Windows.
You should always back up your current MySQL installation before performing an upgrade. See Database Backup Methods.
Download the latest Windows distribution of MySQL from http://dev.mysql.com/downloads/.
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:
NET STOP MySQL
If you are not running the MySQL server as a service, use mysqladmin to stop it. For example, before upgrading from MySQL 5.0 to 5.1, use mysqladmin from MySQL 5.0 as follows:
"C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqladmin" -u root shutdown
If the MySQL
root user account has a
password, you need to invoke mysqladmin
-p option and enter the password
Before upgrading to MySQL 5.1 from a version previous to 4.1.5, or from a version of MySQL installed from a Zip archive to a version of MySQL installed with the MySQL Installation Wizard, you must first 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:
If you do not remove the existing service, the MySQL Installation Wizard may fail to properly install the new MySQL service.
When upgrading from MySQL 5.1.23 to MySQL 5.1.24, the change
in the default location of the data directory from a directory
within the MySQL installation to the
AppData folder means that you must
manually copy the data files from your old installation to the
If you are using the MySQL Installation Wizard, start the wizard as described in Section 1.3.1, “Using the MySQL Installation Wizard for Microsoft Windows”.
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
the existing installation is recommended.
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 1.6.7, “Starting MySQL Server as a Microsoft Windows Service”.)
Restart the server. For example, use NET START MySQL if you run MySQL as a service, or invoke mysqld directly otherwise.
As Administrator, run mysql_upgrade to check your tables, attempt to repair them if necessary, and update your grant tables if they have changed so that you can take advantage of any new capabilities. See mysql_upgrade — Check and Upgrade MySQL Tables.
If you encounter errors, see Section 1.7, “Troubleshooting a Microsoft Windows MySQL Server Installation”.
Copyright © 1997, 2014, Oracle and/or its affiliates. All rights reserved. Legal Notices