MySQL Installation and Service Management Guide

Below is a complete guide covering both steps — installation and managing the MySQL service — for all major platforms.

A. On Windows

  1. Go to the official MySQL download page:

    https://dev.mysql.com/downloads/installer
  2. Download the MySQL Installer for Windows (either web or full version).
  3. Run the installer and select the setup type:
    • Developer Default (recommended for most users)
    • Server Only
    • Custom
  4. Follow the setup wizard to:
    • Install MySQL Server and MySQL Workbench
    • Set a root password
    • Configure MySQL as a Windows service
  5. Finish the installation and test it using MySQL Workbench or Command Line.

B. On Linux (Ubuntu/Debian)

sudo apt update
sudo apt install mysql-server
sudo systemctl start mysql
sudo systemctl enable mysql

You can secure the installation with:
sudo mysql_secure_installation

C. On macOS (Using Homebrew)

  1. Make sure Homebrew is installed. Then run:
brew update
brew install mysql
  1. Set root password:
mysql_secure_installation