Windows

  1. Download MySQL Installer:

    • Download the MySQL Community Server installer from the official MySQL website.

2.Run Installer:

- Run the downloaded .msi installer and follow the installation wizard instructions.
  1. Configure MySQL:

    • During installation, set up MySQL as a Windows service and optionally configure security settings.
  2. Start MySQL Service:

    • MySQL should start automatically as a Windows service after installation.

Linux (CentOS/RHEL using yum)

  1. Add MySQL Repository:
  sudo yum localinstall https://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpm
  
  1. Install MySQL Server:
  sudo yum install mysql-community-server
  
  1. Start MySQL Service:
  sudo systemctl start mysqld
  
  1. Secure MySQL Installation (Optional - recommended):
  sudo mysql_secure_installation
  

Linux (Ubuntu/Debian using apt)

  1. Update Package List:
  sudo apt update
  
  1. Install MySQL Server:
  sudo apt install mysql-server
  
  1. Start MySQL Service:
  sudo systemctl start mysql
  
  1. Secure MySQL Installation (Optional - recommended):
  sudo mysql_secure_installation
  

macOS (using Homebrew)

  1. Install Homebrew (if not already installed):
  /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  
  1. Install MySQL:
  brew install mysql
  
  1. Start MySQL Service:
  brew services start mysql