mysql 常见问题

硬盘已满 Disk is full writing

mysql8 默认开启binlog 数据库访问量过大 导致日志文件沾满硬盘 最终导致redis服务器崩溃 mysql无法访问 等等情况
出现如下错误

The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
2018-09-27T07:33:10.679387Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.12) starting as process 918
2018-09-27T07:33:11.912511Z 0 [ERROR] [MY-011021] [Repl] Error in Log_event::read_log_event(): 'read error', data_len: 400, event_type: 31.
2018-09-27T07:33:11.912542Z 0 [System] [MY-010229] [Server] Starting crash recovery...
2018-09-27T07:33:11.977656Z 0 [System] [MY-010232] [Server] Crash recovery finished.
2018-09-27T07:33:12.059293Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2018-09-27T07:33:12.092587Z 0 [Warning] [MY-010315] [Server] 'user' entry 'mysql.infoschema@localhost' ignored in --skip-name-resolve mode.
2018-09-27T07:33:12.092644Z 0 [Warning] [MY-010315] [Server] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
2018-09-27T07:33:12.092675Z 0 [Warning] [MY-010315] [Server] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
2018-09-27T07:33:12.092723Z 0 [Warning] [MY-010323] [Server] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
2018-09-27T07:33:12.092742Z 0 [Warning] [MY-010323] [Server] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
2018-09-27T07:33:12.092772Z 0 [Warning] [MY-010311] [Server] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
2018-09-27T07:33:12.096409Z 0 [Warning] [MY-010330] [Server] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
2018-09-27T07:33:12.096453Z 0 [Warning] [MY-010330] [Server] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
2018-09-27T07:33:12.104772Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.12'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server - GPL.
2018-09-27T07:55:22.383188Z 25 [ERROR] [MY-011071] [Server] Disk is full writing './binlog.000038' (OS errno 28 - No space left on device). Waiting for someone to free space...
2018-09-27T07:55:22.383221Z 25 [ERROR] [MY-011071] [Server] Retry in 60 secs. Message reprinted in 600 secs
2018-09-27T07:57:13.141625Z 32 [ERROR] [MY-011071] [Server] Disk is full writing './binlog.000038' (OS errno 28 - No space left on device). Waiting for someone to free space...
2018-09-27T07:57:13.141660Z 32 [ERROR] [MY-011071] [Server] Retry in 60 secs. Message reprinted in 600 secs
2018-09-27T08:04:44.425035Z 35 [ERROR] [MY-011071] [Server] Disk is full writing './binlog.000038' (OS errno 28 - No space left on device). Waiting for someone to free space...
2018-09-27T08:04:44.425083Z 35 [ERROR] [MY-011071] [Server] Retry in 60 secs. Message reprinted in 600 secs
2018-09-27T08:14:44.473214Z 35 [ERROR] [MY-011071] [Server] Disk is full writing './binlog.000038' (OS errno 28 - No space left on device). Waiting for someone to free space...
2018-09-27T08:14:44.473243Z 35 [ERROR] [MY-011071] [Server] Retry in 60 secs. Message reprinted in 600 secs

说明
日志路径

/var/lib/mysql

解决办法

清空日志 
mysql> reset master;
关闭功能binlog日志
[mysqld]
skip-log-bin
重启Mysql服务器

备注

查看文件夹使用情况

du -sh 文件夹名称

查看硬盘使用情况

df -h
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小萨技术

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值