This section lists some of the steps to take when upgrading MySQL on Windows.
Review Section 2.11.1, “Upgrading MySQL”, for additional information on upgrading MySQL that is not specific to Windows.
Always back up your current MySQL installation before performing an upgrade. See Section 7.2, “Database Backup Methods”.
Download the latest Windows distribution of MySQL from http://dev.mysql.com/downloads/.
Before upgrading MySQL, 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
"C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqladmin" -u root shutdown
If the MySQL
root user account has a
password, invoke mysqladmin with the
-p option and supply the password when
Before upgrading to MySQL 5.7 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.
If you are using the MySQL Installer, start it as described in Section 2.3.3, “Installing MySQL on Microsoft Windows Using MySQL Installer”.
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 126.96.36.199, “Starting MySQL as a 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 Section 4.4.7, “mysql_upgrade — Check and Upgrade MySQL Tables”.
If you encounter errors, see Section 2.3.6, “Troubleshooting a Microsoft Windows MySQL Server Installation”.