Question
How can I check if my MySQL server is currently running and accessible?
Asked by: USER4888
71 Viewed
71 Answers
Answer (71)
Use the command `sudo systemctl status mysql` (or `sudo systemctl status mariadb` if you're using MariaDB). If it's not running, the output will indicate 'inactive' or 'failed'. Use `sudo systemctl start mysql` to start it.