how to install mysql in windows 10

Video Tutorial
FREE
 Installing MySQL thumbnail
This video belongs to
DBMS Course - Master the Fundamentals and Advanced Concepts
16 modules
Certificate
Topics Covered

In this article, we'll walk you through the process of installing MySQL on a Windows system. We'll cover everything from downloading MySQL to verifying the installation, ensuring you have a smooth setup experience. By following these steps, you'll have MySQL up and running on your Windows computer in no time, ready to power your database-driven applications.

Download MySQL

  1. Visit the MySQL website and navigate to the "Downloads" page. [IMAGE 1 Add scaler topics logo START SAMPLE] image [IMAGE 1 FINISH SAMPLE]

  2. Choose the MySQL Community (GPL) Downloads option. This version is free and open-source, known as the Community Edition.

[IMAGE 2 Add scaler topics logo START SAMPLE] image [IMAGE 2 FINISH SAMPLE]

  1. Next, click on "MySQL Installer for Windows" from the options provided on the following page.

[IMAGE 3 Add scaler topics logo START SAMPLE] image [IMAGE 3 FINISH SAMPLE]

  1. Click on second "Download" for complete package.

[IMAGE 4 Add scaler topics logo START SAMPLE] image [IMAGE 4 FINISH SAMPLE]

  1. Lastly, log in to your Oracle account. If you prefer not to sign in or don't have an account, choose "No thanks, just start my download" in the lower-left corner.

[IMAGE 5 Add scaler topics logo START SAMPLE] image [IMAGE 5 FINISH SAMPLE]

MySQL Installation on Windows

  1. Begin the installation process by opening the downloaded file.

  2. Select the "Custom" installation type and proceed by clicking "Next". Because, you won't even use half of these packages. As a result, it's best to utilize Custom Installation and install the components you need. Don't worry, you can always reinstall these packages by rerunning the installer.

[IMAGE 6 Add scaler topics logo START SAMPLE] image [IMAGE 6 FINISH SAMPLE]

  1. To proceed, open the MySQL Servers section and expand the MySQL Server folder. Then, choose the suitable version for your system and move it to the right column labeled "Products to be Installed."

[IMAGE 7 Add scaler topics logo START SAMPLE] image [IMAGE 7 FINISH SAMPLE]

  1. Expand the "Applications" section, and select all items except "MySQL for Visual Studio." Then, click the right-facing arrow to include them in the installation lineup.

[IMAGE 8 Add scaler topics logo START SAMPLE] image [IMAGE 8 FINISH SAMPLE]

  1. To complete the installation process, select the "Documentation" option and include its items, which provide access to example databases for exploration.

[IMAGE 9 Add scaler topics logo START SAMPLE]
image [IMAGE 9 FINISH SAMPLE]

  1. Click on "Execute." If you want to monitor the installation progress, you can opt to "Show Details" to view the status.

[IMAGE 10 Add scaler topics logo START SAMPLE] image [IMAGE 10 FINISH SAMPLE]

  1. The installer will now initiate the download of MySQL.

  2. After all downloads are complete, MySQL installation will commence. Once the status of each item changes to "Complete," proceed by selecting "Next."

[IMAGE 11 Add scaler topics logo START SAMPLE] image [IMAGE 11 FINISH SAMPLE]

  1. In the configuration wizard, set up the MySQL Server as follows:

    1. Group Replication: Choose "Standalone MySQL Server / Classic MySQL Replication."
    2. Type and Networking: Opt for the default "Config Type Development Computer" for local setup.
    3. Authentication Method: Select "Use Strong Password Encryption for Authentication."
    4. Accounts and Roles: Set a password for your MySQL root (admin) user. For testing purposes, root account suffices.
    5. Windows Service: Stick with defaults, but select "Start the MySQL Server at System Startup" for enabling/disabling. Avoid unnecessary services running on your machine.

[IMAGE 12 Add scaler topics logo START SAMPLE] image [IMAGE 12 FINISH SAMPLE]

  1. Select Execute to apply configurations.

[IMAGE 13 Add scaler topics logo START SAMPLE] image [IMAGE 13 FINISH SAMPLE]

  1. Select Finish to apply your configurations.

[IMAGE 14 Add scaler topics logo START SAMPLE] image [IMAGE 14 FINISH SAMPLE]

  1. Repeat the same configuration process for any other components as needed.

[IMAGE 15 Add scaler topics logo START SAMPLE] image [IMAGE 15 FINISH SAMPLE]

  1. Click on "Finish" to finalize the installation. There's no need to start any applications at this point.

Verify MySQL Installation

To open the MySQL Command Line Client from the command prompt (cmd), follow these steps:

  1. Enter the following command in the command prompt and press Enter:
    mysql -u your_username -p
    
    Replace your_username with your MySQL username.
  2. After pressing Enter, you'll be prompted to enter your MySQL password. Type your password and press Enter.
  3. Once you're logged in, you'll see the mysql> prompt. Now, you can execute SQL commands.
  4. To check the already created databases, use the following command:
    show databases;
    

How to Start and Stop the MySQL Server

  1. Open the Windows Services app by entering "services" into the Windows Search box and selecting "Open."
  2. Once the Services app launches, locate the MySQL service. Its name will typically be "MySQL" followed by the version number.
  3. Select the MySQL service, and you'll see options in the left pane.
  4. If the MySQL service is inactive, choose "Start" to activate it; if already active, options include "Restart" to reboot the service, "Pause" to temporarily halt it, or "Stop" to terminate the service.

Conclusion

  1. Download MySQL: Get MySQL from the official website, selecting the Community Edition for its free and open-source nature.
  2. Install MySQL on Windows: Customize the installation via the MySQL Installer, selecting necessary components, and configuring the MySQL Server to your preferences.
  3. Verify Installation: Ensure MySQL is installed correctly by accessing the MySQL Command Line Client and checking for existing databases.
  4. Manage MySQL Server: Utilize the Windows Services app to start, stop, or restart the MySQL server as needed, granting control over its operation on your system.
  5. Ease of Use: The installation process is straightforward and user-friendly, even for those new to MySQL.

FAQ

Q1. Can I download MySQL for free?

A. Yes, MySQL offers a free Community Edition that can be downloaded and used without cost.

Q2. Which version of MySQL is free?

A. The Community Edition of MySQL, an open-source version, is available for free download and usage, providing robust database management capabilities without cost.

Q3. What is MySQL used for?

A. MySQL is primarily used as a relational database management system (RDBMS) for storing and managing data in various applications, from web development to enterprise solutions.