On this page
Installing MySQL
Windows
-
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.
-
Configure MySQL:
- During installation, set up MySQL as a Windows service and optionally configure security settings.
-
Start MySQL Service:
- MySQL should start automatically as a Windows service after installation.
Linux (CentOS/RHEL using yum)
- Add MySQL Repository:
sudo yum localinstall https://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpm
- Install MySQL Server:
sudo yum install mysql-community-server
- Start MySQL Service:
sudo systemctl start mysqld
- Secure MySQL Installation (Optional - recommended):
sudo mysql_secure_installation
Linux (Ubuntu/Debian using apt)
- Update Package List:
sudo apt update
- Install MySQL Server:
sudo apt install mysql-server
- Start MySQL Service:
sudo systemctl start mysql
- Secure MySQL Installation (Optional - recommended):
sudo mysql_secure_installation
macOS (using Homebrew)
- Install Homebrew (if not already installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install MySQL:
brew install mysql
- Start MySQL Service:
brew services start mysql