Summary: After completing this tutorial, you will be able to install the MySQL database and its tools in Windows operating system. This will enable you to learn and practice MySQL in an efficient manner.
If you are looking for installing MySQL in Ubuntu operating system, you can skip this tutorial and click here for the next tutorial.
- Minimum 4 GB RAM (6 GB recommended)
- Microsoft .NET Framework 4.5.2
- Microsoft Visual C++ Redistributable for Visual Studio 2019
- MySQL Setup Software
The first step towards the installing MySQL database is to download the MySQL software. One of the easiest ways to install MySQL is using MySQL installer. This provides easy to install wizard that comes with MySQL along with the following tools.
- MySQL Server
- MySQL Workbench
- MySQL Shell
- MySQL Router
- MySQL Connectors
- MySQL Documentation
- MySQL Samples and Examples
Follow these steps
Step 1: In order to download MySQL, please visit the official website of MySQL https://dev.mysql.com/downloads/installer/.
Step 2: On the download page, you can see only the latest version of MySQL. In case if you are looking for an older version, you may go to the archives tab and choose the appropriate version. The General Availability(GA) Releases page provides you with two options to download MySQL.
- If you are connected to the internet while installing MySQL, you can choose the online installer version mysql-installer-web-community-<version>.msi
- In case if you want an offline installer i.e. without internet connecting during installation, you need to download the offline installer which is mysql-installer-community-<version>.msi
Installing MySQL on Windows
Step 1: Once you downloaded the MySQL installer, unzip it and double click on the installer.exe file. It will give the following screen.
Step 2: In the next wizard, you can see the following screen. Here you have been given many options to choose from, and you have to choose the appropriate option to install MySQL products and features. In this tutorial, we are going to select the full option and click the Next button.
The full option will install the following things: MySQL Server, MySQL Workbench, MySQL Shell, MySQL Router, MySQL Connectors, documentation, samples, and examples.
Step 3: Once you click the Next button, it may give you the missing component lists which are required in order to continue the installation. We need to resolve these by clicking on the Execute button and that will install the missing components which are prerequisites to proceed further. Now, click on the Next button.
Step 4: Once you click the Next button, you will see a dialog box asking for confirmation of a few products not getting installed. Here, you have to click the Yes button.
After clicking on the Yes button, you will see the list of the products which are going to be installed. Now, click on the Execute button.
Step 5: Once we click on the Execute button, it will install all the products. After completing the installation, click on the Next button.
Step 6: In the next wizard Product Configuration will appear, just click on the Next button.
In the next screen, it will ask you to choose the Config Type and other connectivity options. Here, we are going to select the Config Type as ‘Development Computer’ and Connectivity as TCP/IP, and Port Number is 3306, then click on Next.
Step 7: Once you click the Next button, the Authentication Method page will appear. Here, you can select “Use Strong Password Encryption for Authentication” and click on the Next button.
Step 8: On the next screen, it will ask for the MySQL Root Password which you want to keep. After providing the password twice, click on the Next button.
Step 9: The next wizard will ask you to configure the Windows Service to start the MySQL server. That means once you start up the windows MySQL server will start as part of Window Keep the default setup and click on the Next button.
Step 10: On the next screen, the system will ask for your confirmation for applying the Configuration. You need to click the Execute button.
Step 11: Once the configuration has been completed, you will get the below screen where you can notice all green tick appears. Now, click on the Finish button to continue.
Step 12: On the next screen, you can see that the MySQL server configuration is completed. Now, click on the next button to complete the other product configuration like MySQL Routers, Samples, and Examples.
Step 13: The next screen is all about MySQL Router configuration. So click on Finish->Next button.
Step 14: In the next wizard, you can see the Connect to Server option. Here, you need to mention the root password, which we had set in the previous steps, and click on the Check button. This will show the message “Connection Succeeded”. Now, click on the Next button.
Step 15: On the next screen, Apply Configuration wizard will appear. Here, you need to click on the Execute button.
Step 16: After completing the above step, we will get the following screen. Here, click on the Finish button.
Step 17: Now, the MySQL installation is complete. Click on the Finish button.
Verify MySQL installation
Once MySQL has been successfully installed, the base tables have been initialized, and the server has been started, you can verify it’s working via some simple tests.
Open your MySQL Command Line Client; it should have appeared with a
mysql> prompt. If you have set any password, write your password here. Now, you are connected to the MySQL server, and you can execute all the SQL command at
mysql> prompt as follows:
For example: Check the already created databases with the
show databases command: