2.3.7. Upgrading MySQL on Windows

This section lists some of the steps you should take when upgrading MySQL on Windows.

  1. Review Section 2.13.1, “Upgrading MySQL”, for additional information on upgrading MySQL that is not specific to Windows.

  2. You should always back up your current MySQL installation before performing an upgrade. See Section 6.2, “Database Backup Methods”.

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

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

    C:\> 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.1 to 5.5, use mysqladmin from MySQL 5.1 as follows:

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

    If the MySQL root user account has a password, you need to invoke mysqladmin with the -p option and supply the password when prompted.

  5. Before upgrading a MySQL service from MySQL 5.1 to 5.5, you should stop the 5.1 server and remove the instance. Run the MySQL Instance Configuration Wizard, choose the Remove Instance option and in the next screen, confirm removal. After that it is safe to uninstall MySQL Server 5.1.

  6. Before upgrading to MySQL 5.5 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:

    C:\> C:\mysql\bin\mysqld --remove
    

    If you do not remove the existing service, the MySQL Installation Wizard may fail to properly install the new MySQL service.

  7. If you are using the MySQL Installation Wizard, start the wizard as described in Section 2.3.3.1, “Using the MySQL Installation Wizard”.

  8. 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 C:\mysql5. Overwriting the existing installation is recommended.

  9. 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 2.3.5.7, “Starting MySQL as a Windows Service”.)

  10. Restart the server. For example, use NET START MySQL if you run MySQL as a service, or invoke mysqld directly otherwise.

  11. If you encounter errors, see Section 2.3.6, “Troubleshooting a MySQL Installation Under Windows”.

Copyright © 2010-2017 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout