MySql installation | How to install MySql from zip archive on windows 7

I saw many tutorials about how to install MySql from zip archive on windows 7 on the web but none of them are easy for a newbie[IMO] and that is why I wrote this tutorial. I believe if you go line by line then you will be able to install MySql from zip archive on your windows 7 pc in one shot.

1. Download MySql from here
If your system is 32bit then download 32bit zip archive or if it is 64bit then download 64bit version. You can also download msi installer for wizard based easy installation. But here I am showing how to install MySql from zip archive on windows 7.

2. Once the download is complete extract the zip archive.

3. Rename the extracted folder to MySql for easy access and cut and paste the folder in C:\ [drive].
Now your path should be C:\MySql.

4. Double click on C:\MySql directory then open my-default.ini file in notepad and edit following lines as follows and save it as my.ini [Don’t forget to remove the # symbol at beginning].

 innodb_buffer_pool_size = 128M
 basedir = C:/MySql
 datadir = C:/MySql/data
 port = 3306
 server_id = 21
 join_buffer_size = 128M
 sort_buffer_size = 2M
 read_rnd_buffer_size = 2M

Note: Do not save my.ini as unicode or utf it will through error. Always save it as ansi

5. Now let’s change environment variables for MySql path.

6. To change environment variables right click on My Computer and click on Properties.

7. From left pane click on Advanced System Settings.

8. On System Properties dialog box click on Environment Variables button.

9. Scroll down on System Variables list and select Path.

10. Click on Edit button.

11. On Variable Value field move your cursor to end [Press End button on keyboard].

12. If you do not find any semi colon[;] at the end of the line then put one [semi colon works as line separator].

13. After entering semi colon write C:\MySql\Bin and click Ok button 3 times to close all open dialog boxes and close control panel window also.

14. Now run cmd [Command Prompt] as administrator.

15. change directory to C:\MySql\bin in cmd.
Syntax: cd..\.. [press enter key] followed by cd[space]c:\MySql\bin[Press enter key].

16. Type and run command mysqld.exe –console on cmd window.
You will see some text in cmd window. Don’t close the window right now.

17. Run another cmd window as administrator.

18. Change directory again to C:\MySql\bin

19. Run command mysqld.exe –install on newly open cmd window.

20. Run command mysqladmin -u root shutdown on cmd window.

21. Now press Windows Button + R to open Run dialog box and type services.msc and hit enter.

22. Select MySql and click on start

23. You have just installed MySql successfully.

24. To change root password in MySql write the following query in command prompt[cmd window] and press enter key.
set password for ‘root’@’localhost’ = password(‘your password’);

If you need to remove MySql service for some reason then open command prompt as administrator and type sc delete MySQL and press enter.