Upgrading MySQL on Windows

MySQLMySQLi Database

MySQL can be upgraded on Windows using two methods. They have been listed below −

  • Using MySQL installer

  • Using Windows ZIP archive distribution

Upgrading MySQL with Installer

MySQL installer doesn’t support upgrades between the community and commercial releases. If such an upgrade is required, it can be done using the ZIP archive method.

Let us understand how MySQL can be upgraded with MySQL installer. This is considered the best approach when the current server installation is performed along with it and the upgrade happens within the current release series.

MySQL installer doesn’t support upgrades between release series, such as from 5.7 to 8.0 and so on. It doesn’t provide an upgrade indicator to tell the user to upgrade. Here are the steps −

  • Start the MySQL installer.

  • From dashboard, click on ‘Catalog’, which will download the latest changes that would have occurred in catalog.

  • The server that has been installed can be upgraded only if the dashboard displays an arrow next to the version number of the server.

  • Now click on ‘Upgrade’.

  • Those products which have a new version will appear in a list.

  • Deselect everything except the MySQL server product, unless other products also required an upgrade. Now click on ‘Next’.

  • Now click on ‘Execute’, which will begin the download.

  • When it has been downloaded fully, click on ‘Next’, which will begin the upgrade operation.

  • When upgrades are made to MySQL 8.0.16 or higher, it may show an option to skip the upgrade check and process for system tables.

  • Now configure the server.

Now let us see how MySQL can be upgraded using Windows ZIP distribution.

Upgrading MySQL with Windows ZIP archive distribution

Download the latest version of Windows ZIP archive distribution of MySQL from http://dev.mysql.com/downloads/.

If the server is already running, stop it. If the server has been installed as a service, stop the service using the below command −

C:\> SC STOP mysqld_service_name

Instead of this, the ‘NET STOP mysql_service_name’ command can also be used. If MySQL is not running as a service, ‘mysqladmin’ can be used to stop it. Let us see the command for this −

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

If MySQL root user account has a password, ‘mysqladmin’ can be invoked along with the ‘-p’ option and the password can be entered when it is prompted. The ZIP archive needs to be extracted. The existing MySQL installation can be overwritten, which is usually present at C:/mysql or it can be installed in a different directory such as C:/mysql8.

Now, the server needs to be restarted. This can be done using any of the commands shown below −

SC START mysqld_service_name


NET START mysqld_service_name

Note: Use the above when MySQL is run as a service.

Invoke ‘mysqld’ if MySQL is used directly.

Updated on 08-Mar-2021 12:07:36