MySQL:无法创建/写入文件'/tmp/#sql_3c6_0.MYI'(Errcode:2) - 这甚至是什么意思? [英] MySQL: Can't create/write to file '/tmp/#sql_3c6_0.MYI' (Errcode: 2) - What does it even mean?

查看:2911
本文介绍了MySQL:无法创建/写入文件'/tmp/#sql_3c6_0.MYI'(Errcode:2) - 这甚至是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某种原因,我的生产DB决定抛出这个消息。所有应用程序调用都失败,DB错误:

  PreparedStatementCallback; SQL [/ * long sql语句这里* /]; 
无法创建/写入文件'/tmp/#sql_3c6_0.MYI'(Errcode:2);
嵌套异常是java.sql.SQLException:无法创建/写入文件'/tmp/#sql_3c6_0.MYI'(错误代码:2)

我不知道这甚至是什么意思。在 / tmp 中没有文件#sql_3c6_0.MYI ,我无法创建一个字符由于某些原因。有没有人听说过或看到这个错误?什么可能是错误的和一些可能的事情要看?



MySQL数据库似乎正在运行,可以通过控制台查询,但应用程序似乎通过它来。应用程序代码/文件没有更改。它只是发生了蓝色。所以我甚至不知道从哪里开始看看或什么分辨率的战术应用。任何想法?

解决方案

通常这意味着您的 / tmp 空间不足,无法创建文件,或者由于任何原因,由于权限问题, mysqld 进程无法写入该目录。有时这是您的游行中 selinux 下雨的情况。



任何要求临时文件的操作将会默认情况下进入 / tmp 目录。你看到的名字只是一些内部的随机名称。


For some reason my production DB decided to spew out this message. All application calls fail to the DB with the error:

PreparedStatementCallback; SQL [ /*long sql statement here*/ ]; 
Can't create/write to file '/tmp/#sql_3c6_0.MYI' (Errcode: 2); 
nested exception is java.sql.SQLException: Can't create/write to file '/tmp/#sql_3c6_0.MYI' (Errcode: 2)

I have no idea, what this even means. There is no file #sql_3c6_0.MYI in /tmp and I can't create one with a # character for some reason. Has anyone heard about it or seen this error? What could be wrong and some possible things to look at?

The MySQL DB seems to be up and running and can be queried via the console but the application can't seem to get through to it. There was no change to the application code/files. It just happened out the blue. So I'm not even sure where to start look or what resolution tactics to apply. Any ideas?

解决方案

Often this means your /tmp partition has run out of space and the file can't be created, or for whatever reason the mysqld process cannot write to that directory because of permission problems. Sometimes this is the case when selinux rains on your parade.

Any operation that requites a "temp file" will go into the /tmp directory by default. The name you're seeing is just some internal random name.

这篇关于MySQL:无法创建/写入文件'/tmp/#sql_3c6_0.MYI'(Errcode:2) - 这甚至是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆