Replies: 2 comments 1 reply
-
see mysql log cat /var/log/mysql/error.log |
Beta Was this translation helpful? Give feedback.
-
Run the following command to get more details about the failure: sudo systemctl status mysql.service This will provide useful information about why the service failed to start.
Look at the MySQL logs to identify the root cause of the issue: sudo journalctl -xe | grep mysql Check for any error messages or warnings, such as insufficient disk space, incorrect permissions, or corrupted configuration files.
If the disk is full, MySQL might fail to start. Verify available space: df -h If the space is low, free up some space.
Ensure that MySQL directories have the correct permissions: sudo chown -R mysql:mysql /var/lib/mysql
If there are corrupted tables, MySQL might fail. Try repairing them: sudo mysqlcheck --all-databases --auto-repair
Check if the MySQL configuration file is valid: sudo mysqld --help --verbose | grep my.cnf Fix any errors in the configuration file.
After performing the checks and fixes, restart the MySQL service: sudo systemctl restart mysql.service |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am not entirely sure what happened to my CloudPanel server installed on Ubuntu 22.04. Suddenly, it became inaccessible. Upon checking via the terminal, I found that the Nginx and MySQL services were not running. Nginx started working perfectly after restarting the service, but MySQL remains down. I’m unsure how to troubleshoot this as I don't see any logs in /var/log. Below is the output when I run sudo systemctl status mysql. Additionally, the admin area is inaccessible—whenever I click on Admin Area, I receive a "500 Internal Server Error."
By the way, I did install STIGS on this Ubuntu server. First, I changed the server to Ubuntu Pro. After the hardening was applied, the server ran perfectly, which is why I am unsure if this issue is somehow related.
× mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2025-01-09 17:04:11 UTC; 16h ago
Main PID: 3350 (code=exited, status=1/FAILURE)
Status: "Server shutdown complete"
CPU: 516ms
Jan 09 17:04:11 usdalmknetvs21-127 systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
Jan 09 17:04:11 usdalmknetvs21-127 systemd[1]: Stopped MySQL Community Server.
Jan 09 17:04:11 usdalmknetvs21-127 systemd[1]: mysql.service: Start request repeated too quickly.
Jan 09 17:04:11 usdalmknetvs21-127 systemd[1]: mysql.service: Failed with result 'exit-code'.
Jan 09 17:04:11 usdalmknetvs21-127 systemd[1]: Failed to start MySQL Community Server.
Please help even how to check logs in cloudpanel. Thank you
Beta Was this translation helpful? Give feedback.
All reactions