Installing MySQL on Windows gives you a local database server for building and testing PHP, Python, Node.js, or Java applications offline. The official MySQL Installer configures both the background server service and the command-line client in one wizard.
Visit dev.mysql.com and download the MySQL Installer for Windows (mysql-installer-community). Choose the larger offline installer if your network connection is unstable.
During the configuration wizard, keep the default networking and service options unless another local database already uses port 3306:
3306 and leave the firewall checkbox enabled for local connections.caching_sha2_password), which all modern drivers support.root password and keep Configure MySQL Server as a Windows Service (MySQL80) checked so it starts automatically.Adding the bin folder to your System PATH lets you run mysql from any PowerShell or Command Prompt window:
C:\Program Files\MySQL\MySQL Server 8.0\bin.mysql --version
mysql -u root -p
services.msc, or assign MySQL to port 3307 during setup.mysql Not Recognized: Restart your terminal after editing PATH so Windows reloads environment variables.Yes, tools like Laragon, Herd, or Docker Desktop spin up isolated MySQL instances without altering global Windows services.
Open an Administrator PowerShell window and run net start MySQL80 or net stop MySQL80.
MySQL listens on TCP port 3306 by default for standard client connections.
Sign in to track your learning journey, earn industry-recognized certificates, and join our elite developer community.
Quick Access With
Experiment with the code from this lesson in our interactive playground.