MySQL Installation Guide on Windows & Linux
MySQL Installation Guide on Windows & Linux (Step-by-Step)
Installing MySQL is the first step toward building a strong foundation in database management. Whether you are a student, developer, or aspiring DBA, knowing how to properly install and configure MySQL is essential.
In this detailed guide, we’ll walk through step-by-step installation of MySQL on Windows and Linux systems.
Part 1: MySQL Installation on Windows
Step 1: Download MySQL Installer
- Visit the official MySQL website:
https://dev.mysql.com/downloads/installer/ - Download MySQL Installer for Windows (Choose the Community version – free).
- Select:
- Web Installer (small file, downloads components during setup) OR
- Full Installer (larger file, includes all components)
Step 2: Run the Installer
- Double-click the downloaded
.msifile. - Choose Setup Type:
- Developer Default (Recommended for developers)
- Server Only
- Client Only
- Full
- Custom
For beginners, select Developer Default.
Click Next and install required dependencies.
Step 3: MySQL Server Configuration
After installation, configuration begins automatically.
Choose Configuration Type
- Development Computer (Recommended)
- Server Computer
- Dedicated Computer
Choose Development Computer for practice setup.
Connectivity
- Default Port: 3306
- Keep TCP/IP enabled.
Authentication Method
Choose:
- Strong Password Encryption (Recommended)
Set Root Password
- Create a strong password.
- Optionally add MySQL users.
Remember your root password.
Windows Service
- Keep default service name:
MySQL80 - Select “Start MySQL Server at System Startup”
Click Execute → Finish.
Step 4: Verify Installation
Open Command Prompt:
mysql -u root -p
Enter password → If MySQL shell opens, installation is successful.
Part 2: MySQL Installation on Linux
We’ll cover installation on Ubuntu (Debian-based systems).
Step 1: Update Package Repository
sudo apt update
Step 2: Install MySQL Server
sudo apt install mysql-server
Press Y when prompted.
Step 3: Check MySQL Status
sudo systemctl status mysql
If active (running), installation is successful.
Step 4: Secure MySQL Installation
Run:
sudo mysql_secure_installation
You’ll be asked to:
- Set root password
- Remove anonymous users
- Disallow remote root login
- Remove test database
- Reload privilege tables
Recommended: Answer Yes (Y) to all security options.
Step 5: Login to MySQL
sudo mysql -u root -p
Enter password → MySQL prompt should appear.
Optional: Install MySQL on RHEL/CentOS
For RPM-based systems:
sudo yum install mysql-server
Or for newer versions:
sudo dnf install mysql-server
Start service:
sudo systemctl start mysqld
Enable auto-start:
sudo systemctl enable mysqld
How to Check MySQL Version
mysql --version
Example Output:
mysql Ver 8.0.xx for Linux on x86_64
Important Post-Installation Tips
✔ Always secure root account
✔ Change default port in production
✔ Create separate application users
✔ Enable firewall rules
✔ Take regular backups
Conclusion
Installing MySQL on Windows and Linux is straightforward if you follow proper steps. Whether you’re setting up a development environment or preparing for DBA practice, understanding installation and configuration is fundamental.
Mastering these basics builds confidence for advanced topics like replication, performance tuning, backup & recovery, and high availability.
If you are planning to build a career in Database Administration, hands-on installation practice is your first step toward becoming a confident MySQL professional. At Learnomate Technologies, we focus on practical, real-time training that helps students master MySQL installation, configuration, performance tuning, and production-level database management to prepare them for real industry challenges.





