关于mysql5.6无法创建/写入文件解决过程
问题:
[[email protected]+jenkis local]# mysql |
解决过程:
查看mysql日志
...... /usr/sbin/mysqld: Sort aborted: Error writing file '/tmp/MYK7hRaS' (Errcode:28 No space left on device) ...... |
通过df -h命令,
发现/dev/mapper/vg_centos1-lv_root已使用100%;
因/dev/mapper/vg_centos1-lv_root挂载在/ 根目录下,
再通过du -h --max-depth=1命令,
逐层查找大文件。
这里是发现/usr/local/jira/export目录下有多个jira的zip备份压缩文件。
解决办法:
由df -h发现/home目录剩余空间多,
于是在/home目录下创建jira_export_file目录用来另存jira的zip备份文件,
释放/ 根目录空间。
重启mysql服务,成功。
参考:
https://dev.mysql.com/doc/refman/5.6/en/cannot-create.html
https://www.cnblogs.com/kluan/p/4458278.html