Install MySQL Server on Windows

Install MySQL Server on Windows

We will walk you through the process of installing MySQL Server on a Windows operating system

Whether you're setting up MySQL for a development project or for learning purposes, this guide will make the process straightforward and easy to follow.

Download

To get started, head to the MySQL Community Downloads page and download the installer for Windows. Make sure to select the correct version and architecture (32-bit or 64-bit) based on your system requirements.

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


Install

Apply Updates Screen:
The MySQL Installer is applying updates to MySQL Server and other products.

  • Product Configuration:
    The configuration wizard is ready to configure MySQL Server and examples.

Type and Networking:

  • Select the server type and network settings for your MySQL installation.

Accounts and Roles:
Set a password for the root account and add other user accounts if needed.

Windows Service:
Configure MySQL Server to run as a Windows service and start automatically.

Server File Permissions:
Choose the level of access for MySQL Server's data files.

  • Apply Configuration:
    Apply the configuration changes and start the MySQL server.

Product Configuration Finished:
MySQL Server configuration is complete and ready to use.

Final Configuration:
The installer is running final scripts to complete the setup.


MySQL Installation Directory

This is the bin directory where the MySQL Server binaries are stored, located at C:\Program Files\MySQL\MySQL Server 8.0\bin.

C:\Program Files\MySQL\MySQL Server 8.0\bin


Open System Environment Variables

  • Search for "Edit the system environment variables" in the Start menu to open the settings.

Edit Environment Variables

  • Click on the "Path" variable in System Variables and then click "Edit."

Add MySQL Path

Add the MySQL bin directory path (C:\Program Files\MySQL\MySQL Server 8.0\bin) to the system path.


Connect to MySQL as Root User

Use the command mysql -u root -p to log in to MySQL with the root user. You will need to enter your password to access the MySQL monitor.

mysql -u root -p


Show Databases

Use the show databases; command to list all databases in your MySQL server.

show databases;


Exit