1. Log into Windows 2000 or later as a user with Administrator privileges. If this is not an upgrade or downgrade, skip to step 5. 2. Back up my.ini. Back up MySQL data with mysqldump if the upgrade or downgrade crosses 4.0 - 4.1 - 5.0 - 5.1 - 5.4 - 5.5 - 5.6, or if upgrade issues require it:
3. If MySQL is running as a service, shut it down by right-clicking on it in My Computer | Manage | Services and Applications | Services. and selecting Stop. Or open a command-line window and issue
substituting for mysqld, if necessary, the .exe name your service uses. Otherwise stop MySQL with this command from the bin folder of your MySQL installation:
4. If your previous installation is earlier than 4.1.5, or if you are downgrading, remove it. Automatic upgrade is officially safe since 4.1.5, but can go awry, so it can be convenient to rename the current installation folder, then install to a folder of the same name. 5. If you downloaded the Windows installer .msi package, double-click on it from the desktop or Explorer. If you have the no-installer package, it will have a name like mysql-5.6.14-win32-noinstall.zip; unzip it, respecting folder names, into the root folder of the installation drive. Since 4.0.17, MySQL can cope with spaces in its paths, but in practice they are awkward. Whatever you choose, right-click on the My Computer desktop icon, select Properties | Advanced | Environmental Variables, and make two edits: (a) set an environment variable named MYSQL_HOME to your full MySQL installation path, or to the bin folder of that installation (depending on how you plan to referto it in commands).(b) edit the PATH environment variable, remove references to previous MySQL installations, and add the full path to the bin folder of your current MySQL installation.Remember, Windows remains unaware of these changes until you reboot the machine. 6. From 5.0.2 until 5.5, MySQL for Windows shipped with MySQLInstanceConfig.exe, and offered to run it after files are installed. If this is a first installation, run MySQLInstanceConfig; it walks you through the options, writes my.ini to <MYSQL_HOME> , configures a MySQL service to run
then it starts the service for you; skip to Step 12. Since 5.5, MySQL for Windows has shipped with an all-in-one installer that has MySQLInastanceConfig functionality built-in. 7. If this is an upgrade, MySQLInstanceConfig.exe (or the all-in-1 installer) can configure your server, but in upgrades from 5.4 to 5.5 or 5.5 to 5.6, there are serious problems: without asking, it creates your option file in \Program Files\MySQL\MySQL Server 8. Unless you ran MySQLInstanceConfig or are running the all-in-1 installer, copy your previous my.ini to \Program Files\ MySQL\MySQL Server 9. Run the MySQL server in a DOS window from %MYSQL_HOME%\bin with
substituting for
If the server loads successfully, if InnoDB is enabled it will spit out several lines ending with something like this:
To see what server options can be and have been set, issue
Cycle though testing, shutdown, my.ini edits and server restarts till the errors stop. 10. Check for version-specific upgrade issues. 11. Run your mysqldump script from the mysql client:
Then stop the server with
and restart it in My Computer | Manage | Services and Applications | Services. 12. Connect with the MySQL client from <MySQL_HOME> \bin:
Test, and test again. |