How It Works
On Windows, MySQL runs as a Windows service registered by the MySQL Installer. The default service name is MySQL80 for MySQL 8.0. You can manage it with PowerShell cmdlets, the net command, the Services MMC snap-in (services.msc), or the MySQL Notifier tray icon.
flowchart LR
A[Windows Service Manager] --> B[MySQL80 service]
B --> C[mysqld.exe process]
C --> D[Port 3306 listening]
D --> E[Accepts TCP connections]Finding the MySQL Service Name
Open PowerShell and list MySQL-related services.
Get-Service -DisplayName "MySQL*"Status Name DisplayName
------ ---- -----------
Running MySQL80 MySQL80The service name (e.g., MySQL80) is what you use in all management commands.
Method 1 - PowerShell (Recommended)
Run PowerShell as Administrator for service management commands.
# Start MySQL
Start-Service -Name MySQL80
# Stop MySQL
Stop-Service -Name MySQL80
# Restart MySQL
Restart-Service -Name MySQL80
# Check status
Get-Service -Name MySQL80Output example:
Status Name DisplayName
------ ---- -----------
Running MySQL80 MySQL80Method 2 - net Commands (Command Prompt)
Open Command Prompt as Administrator.
# Start MySQL
net start MySQL80
# Stop MySQL
net stop MySQL80Method 3 - Services Console (services.msc)
- Press
Win+R, typeservices.msc, and press Enter. - Scroll to find MySQL80.
- Right-click and select Start, Stop, or Restart.
Method 4 - MySQL Notifier (Deprecated)
MySQL Notifier was a tray application previously bundled with MySQL Installer. It is no longer included in current MySQL 8.0+ Installer packages. If you have an older installation that includes it, the steps are:
- Right-click the MySQL tray icon.
- Hover over the service name (e.g.,
MySQL80). - Click Start, Stop, or Restart.
Configuring Automatic Startup
To ensure MySQL starts when Windows boots:
Set-Service -Name MySQL80 -StartupType AutomaticTo prevent automatic startup:
Set-Service -Name MySQL80 -StartupType ManualCheck the current startup type:
Get-Service -Name MySQL80 | Select-Object Name, StartTypeVerifying MySQL Is Running
After starting the service, confirm MySQL is accepting connections.
mysql -u root -p -e "SELECT 1;"+---+
| 1 |
+---+
| 1 |
+---+Check the port is listening.
netstat -an | findstr 3306TCP 0.0.0.0:3306 0.0.0.0:0 LISTENINGOr with PowerShell:
Get-NetTCPConnection -LocalPort 3306Viewing MySQL Service Logs on Windows
MySQL logs to a file in the data directory (set during installation). The default location is:
C:\ProgramData\MySQL\MySQL Server 8.0\Data\<hostname>.errView the last 50 lines in PowerShell:
Get-Content "C:\ProgramData\MySQL\MySQL Server 8.0\Data\YOURHOST.err" -Tail 50Follow the log in real time:
Get-Content "C:\ProgramData\MySQL\MySQL Server 8.0\Data\YOURHOST.err" -Wait -Tail 10Starting MySQL Manually (Without the Service)
To start mysqld directly from the command line (useful for troubleshooting):
"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe" --defaults-file="C:\ProgramData\MySQL\MySQL Server 8.0\my.ini" --consolePress Ctrl+C to stop.
Registering or Removing the Service
Register the service (if it was manually removed):
"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe" --install MySQL80 --defaults-file="C:\ProgramData\MySQL\MySQL Server 8.0\my.ini"Remove the service:
"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe" --remove MySQL80Summary
MySQL on Windows runs as a service named MySQL80 (or similar). Use PowerShell Start-Service, Stop-Service, and Restart-Service cmdlets, or the net start / net stop commands from an Administrator prompt. The Services console offers a graphical alternative. Configure Automatic startup type to ensure MySQL starts with Windows.
Nawaz Dhandala
Author@nawazdhandala • Mar 31, 2026 •
Technically validated
Apr 11, 2026This post passed an automated technical review for accuracy. Automated validation isn't perfect, though — it can still miss nuance or get a detail wrong. If you spot something that's off or could be explained more clearly, we'd genuinely welcome your help improving it.
Help improve this post
Every OneUptime blog post is open source. Found a typo, an inaccuracy, or have a clearer way to explain something? Anyone can contribute — your edits make this post better for everyone who reads it next.