mysql启动时 "No space left on device"

先用free 命令查看剩余空间

[root@tokyo mysqld]# free
              total        used        free      shared  buff/cache   available
Mem:        1016108      632132      205776       66344      178200      180496
Swap:             0           0           0

发现swap 为零了

执行

dd if=/dev/zero of=/swapfile bs=1M count=1024
mkswap /swapfile
wapon /swapfile
swapon /swapfile

再用free查看

[root@tokyo ~]# free
              total        used        free      shared  buff/cache   available
Mem:        1016108      732148       63984       51400      219976       71132
Swap:       1048572      209240      839332

启动mysql, 解决

Licensed under CC BY-NC-SA 4.0
Built with Hugo
主题 StackJimmy 设计