Step 2: Starting and Stopping MySQL Service
Once MySQL is installed, you will often need to start, stop, or check the
status of the MySQL service. The commands differ slightly depending on your
operating system.
1. On Windows
To start or stop the MySQL service:
net start mysql
net stop mysql
▶️ Run in: Command Prompt (Start → cmd) or PowerShell
2. On Linux (Ubuntu/Debian)
To manage the MySQL service:
sudo systemctl start mysql
sudo systemctl stop mysql
sudo systemctl status mysql
▶️ Run in: Terminal
3. On macOS (Using Homebrew)
To start or stop the MySQL service:
brew services start mysql
brew services stop mysql
▶️ Run in: Terminal