Install MySQL Community Server on Windows – Complete Beginner's Guide
If you're planning to build professional web applications with FastAPI, you'll need a reliable database to store and manage your application's data. One of the most popular and widely used relational database management systems is MySQL Community Server.
MySQL is trusted by millions of developers and organizations worldwide because it is fast, secure, scalable, and open-source. Throughout this FastAPI course, we will use MySQL Community Server to create databases, tables, manage data, and connect our FastAPI applications using SQLAlchemy and other database libraries.
In this guide, you'll learn how to download, install, configure, and verify MySQL Community Server on a Windows computer.
What is MySQL Community Server?
MySQL Community Server is the free, open-source edition of MySQL developed and maintained by Oracle. It is a relational database management system (RDBMS) that stores data in structured tables using the SQL (Structured Query Language).
MySQL is widely used in web development and supports applications ranging from small websites to enterprise-level systems.
Some of its key features include:
Free and open-source
High performance
Secure user authentication
Multi-user support
ACID-compliant transactions
Cross-platform compatibility
Excellent support for Python, FastAPI, PHP, Java, and many other programming languages
Why Do We Need MySQL for FastAPI?
FastAPI is commonly used to build APIs that store and retrieve data from databases.
Throughout this course, we will use MySQL to:
Create databases
Create tables
Store application data
Manage users and permissions
Perform CRUD (Create, Read, Update, Delete) operations
Connect FastAPI using SQLAlchemy and database drivers
Build real-world backend applications
Learning MySQL is an essential skill for every backend developer.
System Requirements
Before installing MySQL Community Server, ensure your computer meets these minimum requirements:
Requirement | Minimum |
|---|---|
Operating System | Windows 10 or Windows 11 (64-bit) |
RAM | 4 GB (8 GB recommended) |
Storage | At least 2 GB free space |
Internet | Required for download |
Which MySQL Installer Should You Download?
Oracle provides two installer options:
MySQL Installer Web
Small download (about 2–3 MB)
Downloads required components during installation
Requires an internet connection
MySQL Installer Full
Large download (around 400–500 MB)
Includes all components
Can be installed offline
Recommendation: If you have a stable internet connection, use the MySQL Installer Web.
Download MySQL Community Server
Always download MySQL from the official Oracle website.
Official Download Page
https://dev.mysql.com/downloads/installer/
Choose:
Windows (x86, 32-bit), MySQL InstallerAlthough the installer says 32-bit, it installs the 64-bit MySQL Server on modern Windows systems.
Install MySQL Community Server
Step 1
Open your Downloads folder.
Locate the downloaded installer.
Example:
mysql-installer-web-community-9.x.x.msiDouble-click the installer.
Step 2
If Windows asks:
Do you want to allow this app to make changes?Click:
YesStep 3
Choose the setup type.
You'll see several options:
Developer Default
Server Only
Client Only
Full
Custom
For this FastAPI course, select:
Developer DefaultThis installs:
MySQL Community Server
MySQL Workbench
MySQL Shell
MySQL Command Line Client
MySQL Connectors
Required dependencies
Click Next.
Step 4
If required dependencies are missing (such as Microsoft Visual C++ Redistributable), the installer will prompt you to install them.
Click:
ExecuteWait until all dependencies are installed.
Then click Next.
Step 5
The installer will display all products to be installed.
Click:
ExecuteThe installation process may take several minutes.
Configure MySQL Server
After installation, the MySQL Configuration Wizard will start automatically.
Step 6 – Config Type
Choose:
Development ComputerThis uses fewer system resources and is ideal for learning and development.
Click Next.
Step 7 – Connectivity
Keep the default settings:
Port: 3306Enable:
TCP/IP
Leave all other settings unchanged unless you have a specific requirement.
Click Next.
Step 8 – Authentication Method
Select:
Use Strong Password EncryptionClick Next.
Step 9 – Create Root Password
Create a strong password for the MySQL root user.
Example:
Root Password:
************Important: Write down your password in a safe place. You will need it whenever you connect to MySQL.
Click Next.
Step 10 – Windows Service
Keep the default settings:
Service Name:
MySQLEnable:
Start MySQL Server at System Startup
Click Next.
Step 11 – Apply Configuration
Click:
ExecuteThe installer will:
Configure MySQL
Create Windows services
Start the MySQL Server
Wait until every item shows Complete.
Click Finish.
Verify MySQL Installation
Method 1 – Using Command Prompt
Open Command Prompt.
Run:
mysql --versionExample output:
mysql Ver 9.x.x for Win64If a version number appears, MySQL has been installed successfully.
Method 2 – Using MySQL Command Line Client
Open:
MySQL Command Line ClientEnter your root password.
If you see:
mysql>The server is working correctly.
Method 3 – Using MySQL Workbench
Open:
MySQL WorkbenchConnect using:
Host: localhost
Port: 3306
Username: root
Password: (your root password)
If the connection succeeds, MySQL is ready to use.
Common Installation Problems
MySQL Command Not Found
If:
mysql is not recognized...appears, MySQL may not be added to the system PATH.
Restart Windows or add the MySQL bin directory to the PATH manually.
Port 3306 Already in Use
Another application may already be using port 3306.
Either stop the conflicting application or change the MySQL port during installation.
Forgot Root Password
You can reset the root password later using MySQL's password recovery procedure.
MySQL Service Won't Start
Open Services in Windows and verify that the MySQL service is running.
Restart the service if necessary.
Best Practices
Always download MySQL from Oracle's official website.
Use a strong root password.
Keep MySQL updated.
Use Developer Default for development environments.
Never share your root password.
Create separate database users for production applications instead of using the root account.
Summary
Congratulations! You have successfully installed MySQL Community Server on your Windows computer.
Your system is now ready to store and manage data for FastAPI applications. In the next lesson, we will install MySQL Workbench (if it wasn't installed with the Developer Default setup) and learn how to create databases, tables, and manage data using a graphical interface.
Frequently Asked Questions (FAQs)
Is MySQL Community Server free?
Yes. MySQL Community Server is completely free and open-source.
Do I need MySQL Workbench?
It is not required, but it makes managing databases much easier with a graphical interface.
Which port does MySQL use?
By default, MySQL uses:
3306Can I use MySQL with FastAPI?
Yes. MySQL works very well with FastAPI using libraries such as SQLAlchemy and MySQL drivers.
Official Download Links
MySQL Community Server: https://dev.mysql.com/downloads/installer/
MySQL Documentation: https://dev.mysql.com/doc/
MySQL Workbench: https://dev.mysql.com/downloads/workbench/