### Failed to start database :
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
And this is logs :
[ubuntu@vps~]# /etc/init.d/mysql stop
Stopping mysql (via systemctl): mysql.service.
[ubuntu@vps-f80251d6 ~]# killall -KILL mysql mysqld_safe mysqld
sh: 1: killall: not found
[ubuntu@vps~]# /etc/init.d/mysql start
Starting mysql (via systemctl): mysql.serviceJob for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
failed!
[ubuntu@vps~]# systemctl status mysql.service
â mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2022-02-08 14:45:43 UTC; 8s ago
Process: 215306 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Process: 215321 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
Main PID: 215321 (code=exited, status=1/FAILURE)
Status: "Server startup in progress"
Feb 08 14:45:43 vps-f80251d6 systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
Feb 08 14:45:43 vps-f80251d6 systemd[1]: mysql.service: Failed with result 'exit-code'.
Feb 08 14:45:43 vps-f80251d6 systemd[1]: Failed to start MySQL Community Server.
Feb 08 14:45:43 vps-f80251d6 systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
Feb 08 14:45:43 vps-f80251d6 systemd[1]: Stopped MySQL Community Server.
Feb 08 14:45:43 vps-f80251d6 systemd[1]: mysql.service: Start request repeated too quickly.
Feb 08 14:45:43 vps-f80251d6 systemd[1]: mysql.service: Failed with result 'exit-code'.
Feb 08 14:45:43 vps-f80251d6 systemd[1]: Failed to start MySQL Community Server.
[ubuntu@vps~]# journalctl -xe
sh: 1: journalctl: not found
Any idea what is the issue ? And what I can do to solve ?
Is this a new VPS build? Has it ever worked? If it did work at some point, have you upgraded anything e.g. cnf file or other configs? If never worked how was mysql installed?
Itâs a new VPS yes, honestly I canât remember if it worked, but I do think yes, but I am not sure. In any way, I never use it on this server.
I removed days ago some mysql bin log files in /var/lib/mysql folder, because it was using all space on my VPS. Not sure if this can cause that issue.
If it is a new VPS, the easiest way to fix this is to reinstall it completely ⊠and never delete/modify anything again in /var/lib/mysql : MySQL hates when one messes up with its files
Yes, that is a no no. Server can get seriously irritated if you delete those files. You have to purge them instead. If you have a backup, I would restore locally if that is an option, purge then upload to online server. If not, you have to start clean again.
Ok, then I will rebuilt it from scratch. Then question, I had issues with those binlog files getting too much in size, like 19Gb, while my server is 20Gb. How can I block this ?
SQL is my kryptonite, so I just leave it to do what it does, but Googling âmysql purge bin logâ did produce quite a few results so it should be doable.