Follow below steps to Complete the installation of Mysql on windows machine(Windows10 and windows 11)
1. Go to website to download Mysql, https://dev.mysql.com/downloads/installer/
2. Select the MySql Version and Operating system, then Click on download button
3. Click on No thanks, just start my download.
4. It starts downloading, wait until download
5. Click in show in folder
6. Double click on downloaded file, it asks to install click on allow or yes
7. Select custom in setup type and click next
8. Select these Products , Expand them and select the file click on right arrow to add to right side(choosing products) and click on Next
9. Click on Execute to start downloading the required files/packages
10. Here you can see downloading started, wait until three files completes 100%
11. Here you can see the status of file downloads, downloads completed click on Next
12. Click on Next on Product configuration, then mysql will be configured
13. Now we have to setup port for mysql, choose or type 3306 and click next
14. In the Authentication method, choose use strong Password Encryption for Authentication, click on Next
15. In the Accounts and Roles step, we have to give strong password and repeat ti and press next (Password Better to contains Caps, Small letters, numbers and symbol)
16. In the windows Service step add Service Name(It is Windows Service name) we can use default given name and Better to tick/select Start Mysql At system starts
17. In Server File permission Step: Select Yes, Grant full access for windows administrator group
18. Configuration: Click on Execute to start giving permissions
19. Once after we clicking Execute button, Configuration setup starts and completes
20. Next step, just Check the version click on Next
21. Installation is finished, Tick Start Mysql Workbench and Mysql Shell to start after setup
(if you don’t need you can untick, and open manually when you need)
22. Now it is time to add Environment PATH variable for Mysql(with MySql Bin Path),
Copy the Path
23. Now Open windows Search type Environment Variables, Select the Search Result, it will opens system properties window
24. In this windows click on Environment Variables
25. Go to System Variables, In the list select the Path, double click on it, click on Add and paste the copied Mysql Bin Folder path
26. It’s Completed !, Now we can check the installation, go to CMD and type
mysql –version
You will get response from the command prompt with the musql vesion installed
27. Login
mysql -u root -p
Enter password
It is done with login
28. Creating database
Run the command : create database booksdb;
29. Select the database
Run the command : use database booksdb;
30. Create tables inside the booksdb
Run the command : create table books_table (book_number int, book_name varchar(30));
Table will be created
31. Inserting the data into the tabel books_table
Run the command :
insert into books_table values ( 1, ‘Stavanger’);
insert into books_table values ( 2, Bookvistan);
insert into books_table values ( 3, Travelstar);
32. Reading the table data
Run the command : select * from books_table;