As I understand that if MySQLd service isn’t starting after a server restart, it could be due to database corruption.
I would suggest you to follow below steps:
- Check error logs using:
sudo cat /var/log/mysql/error.log
This will show what’s causing the issue.
- Force InnoDB recovery (if tables are corrupted):
Force InnoDB recovery (if tables are corrupted):
Add innodb_force_recovery = 1 in my.cnf under [mysqld]
Restart MySQL: sudo systemctl restart mysql
You can explore tools like Stellar Repair for MySQL if corruption is severe.
Check permissions & disk space:
sudo chown -R mysql:mysql /var/lib/mysql
df -h # Check disk space
And yes if the issue persists then restoring from a backup might be the best option also. Try and see!