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:
md c:\backup mysqldump -uYOUR_MYSQL_USERNAME -pYOUR_MYSQL_PASSWORD -K -E -R -A >c:\backup\mydata.sql3. 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 net stop MySQL mysqld --removesubstituting for mysqld, if necessary, the .exe name your service uses. Otherwise stop MySQL with this command from the bin folder of your MySQL installation: mysqladmin -uYOUR_MYSQL_USERNAME -pYOUR_MYSQL_PASSWORD shutdown 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 (b) edit the mysqld --defaults-file="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
10. Check for version-specific upgrade issues.
11. Run your mysqldump script from the mysql client:
12. Connect with the MySQL client from Last updated 16 Aug 2024 |