解决方案1:
小编自己的服务器上所有的网站都出现问题,有的打开没有数据,有的直接是空白。
小编第一反应就是数据库挂了。打开远程,进了系统,service mysqld stop 失败。service mysqld start等了好大一会,提示Timeout error occurred trying to start MySQL Daemon
一开始以为是mysql用户问题,查询系统用户完全没有问题。
打开log日志一看,问题出现了Can't start server: can't create PID file: No space left on device;
df -h看了一下磁盘,1000G的硬盘已经使用了百分之百,可用为0;
小编删光了var/log文件夹。没想到的是log日志已经积累达到85G。
删除后启动mysql一切正常。
解决方案2:
小编最近在维护linux服务器时发现,网站打不开了,经过检查发现是mysql数据库宕掉了,死活就是启动不起来。
然后看mysql日志文件
出现Can't start server: can't create PID file: No space left on device 这个错误。 提示磁盘空间不足 后用df -h 命令查看
解决方案3:
mysql启动失败,日志显示如下:
120321 14:23:54 innodb: 1.1.8 started; log sequence number 1595695 120321 14:23:54 [ERROR] /usr/libexec/mysqld: Error writing file ‘/var/run/mysqld/mysqld.pid' (Errcode: 28) 120321 14:23:54 [ERROR] Can't start server: can't create PID file: No space left on device 120321 14:23:54 mysqld_safe Number of processes running now: 0 120321 14:23:54 mysqld_safe mysqld restarted 120321 14:23:54 [Note] Plugin ‘FEDERATED' is disabled. 120321 14:23:54 InnoDB: The InnoDB memory heap is disabled 120321 14:23:54 InnoDB: Mutexes and rw_locks use InnoDB's own implementation 120321 14:23:54 InnoDB: Compressed tables use zlib 1.2.3 120321 14:23:54 InnoDB: Using Linux native AIO 120321 14:23:54 InnoDB: Initializing buffer pool, size = 128.0M 120321 14:23:54 InnoDB: Completed initialization of buffer pool 120321 14:23:54 InnoDB: highest supported file format is Barracuda. 120321 14:23:55 InnoDB: Waiting for the background threads to start