Yesterday was so tough for Ninja Softs (Private) Limited
MySQL server service on one of our cPanel Live Server was stopped and our sites were displaying database connectivity.
It was so stressful moments. What we did to overcome this problem was:
1. Erased junk log files from server to increase the disk space. We used following terminal commands multiple times, until we land to that file & directory which consumed most of the space.
du -h –max-depth=1
2. After that, we attempted many times to Restart MySQL server using terminal commands ” service mysqld start” & “systemctl status mysqld.service” and from WHM too. But that MySQL service was unable to start because of some misconfiguration errors, as displayed by error messages during that process.
We were totally blocked at that time. Our websites were stop working and clients were calling us about whats going on.
3. After that we analyzed that it was /var/lib/mysql (main folder for MySQL) folder by which this service was strucked. What I did was: Rename that folder to mysqlbk and then restart MySQL and unexpectedly it restarted. The command was “mv /var/lib/mysql /var/lib/mysqlbk”
4. After getting restarted MySQL successfully, I simply changed again mysqlbk directory to mysql using “mv /var/lib/mysqlbk /var/lib/mysql” terminal command.
All sites and services working normal now.
Although I am not a system administrator by profession but sometimes these aspects required personal attention which worked fortunately. Hit Like and comment if you found these lines valuable.
Muhammad Ahmed Raza
#mysql #database #webdeveloper #NinjaSofts