Today I encountered a MySQL-related error, so I’m recording it.

root@iZ2ze2hwhau036810z3eyrZ:/opt/web# systemctl start mysql
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2021-05-10 15:58:54 CST; 3min 28s ago
  Process: 3330 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
  Process: 3368 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid (code=exited, status=1/F

Later, no matter how many times I restarted, I couldn’t run the MySQL service.

In the end, I searched through forums but couldn’t find where my problem was.

Result:

root@iZ2ze2hwhau036810z3eyrZ:~# df
Filesystem     1K-blocks     Used Available Use% Mounted on
udev              953472        0    953472   0% /dev
tmpfs             193720      484    193236   1% /run
/dev/vda1       41152812 41115388         0 100% /
tmpfs             968596        0    968596   0% /dev/shm
tmpfs               5120        0      5120   0% /run/lock
tmpfs             968596        0    968596   0% /sys/fs/cgroup
tmpfs             193716        0    193716   0% /run/user/0

Okay, it turned out to be a disk space issue…