Master java skills

Set up MySQL database on Windows

Prerequisite

Before downloading MySQL database, we need to make sure that our machine has Microsoft .NET framework version 4.5.2 or higher

To check the same open powershell by following navigation

Windows -> PowerShell

Run the following command to check the version of .NET framework

Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -Recurse | Get-ItemProperty -Name version -EA 0 | Where { $_.PSChildName -Match '^(?!S)\p{L}'} | Select PSChildName, version

In the above snapshot we can see that it is already installed with version 4.8. In case, it is not installed, then follow the below steps.

Install .NET framework

Note -> Please note that this step is required only if .NET framework is not installed on your machine. (We have verified this in the previous step)

To install .NET framework, click here or, go to website – https://dotnet.microsoft.com/en-us/download/dotnet-framework/net48

Download MySQL

After .NET framework is installed successfully, we can proceed with MySQL database installation

Step 1 : Visit the following website to download the installer for MySQL

https://dev.mysql.com/downloads/installer/

choose the below option

Step 2 : This will install installer file on windows as shown below

Now, start installing the database by double cliking on this installer file

Step 3 : Click Next

Step 4 : Click Next

Step 5 : Click Next

Step 6 : Click Execute

Step 7 : Upon successful completion, following screen will appear. Click Next

Step 8 :

Step 9 : Leave all the settings as it is and click Next

Step 10 :

Step 11 : Enter a password for ‘Root’ user and note it down somewhere. It will be used later

Step 12 : Add user by clicking on the Add User button on right hand side

Step 13 :

Step 14 :

Step 15 :

Step 16 :

Step 17 :

Step 18 :

Step 19 :

Step 20 : Test the connection after entering password for the user ‘root’ created in step 11. and clicking on the ‘Check’ button.

Step 21 : Upon successful completion, you will get following screen

Step 22 :

Step 23 :

Step 24 :

Step 25 :

Click Finish button and installation is complete.

Step 26 : Set environment variable called MYSQL_HOME

Step 27 : Edit path variable and make this entry of MySQL database

Test the MySQL database

Open command prompt and run below command

mysql -u root -p

Enter password for user ‘root’ created in step 11. Upon successful login, following screen will appear

This completes installation and testing of MySQL database on windows