# MySQL启动报错 Starting MySQL.. ERROR! The server quit without updating PID file

**URL:** <https://www.shiqidu.com/t/topic/703>\
**Category:** 开发调优\
**Tags:** MySQL\
**Created:** [2020 年6 月 23 日 04:49 UTC](https://www.shiqidu.com/t/topic/703 "2020-06-23T04:49:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

作者： ![Leon](https://www.shiqidu.com/user_avatar/www.shiqidu.com/leon/32/5_2.png) [@Leon](https://www.shiqidu.com/u/Leon)\
发布日期： [2020 年6 月 23 日 04:49 UTC](https://www.shiqidu.com/t/topic/703/1 "2020-06-23T04:49:02Z")

</div>

刚刚发现MySQL挂了，然后重启MySQL的时候遇到下面的错。

```bash
# /etc/init.d/mysql start
Starting MySQL.. ERROR! The server quit without updating PID file (/usr/local/mysql/var/iz2ze1quxhnlk8z05khr2ez.pid).

```

原因是binlog日志文件太大，占满了磁盘。在mysql的var文件夹下。

```bash
# du -sh *
6.7M mysql-bin.000008
12K mysql-bin.000009
625M mysql-bin.000010

```

最大的log文件都625兆了。binary log 主要是做数据恢复和主从复制的，因为我没有配置主从，所以直接清空binlog后重新启动即可。

```bash
# rm -rf mysql-bin.*
# /etc/init.d/mysql start

```
