sudo systemctl status mysql

Category: Databases & SQL

sudo systemctl status mysql

Show MySQL service status

Reports whether the mysql unit is active, the mysqld process IDs, and recent log lines. A nonzero exit code when the service is down makes it script-friendly. Use --no-pager for cron and CI.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.