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?

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

问题描述

出于某种原因,我的生产数据库决定发出这条消息.所有应用程序调用都失败并显示错误:

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)

我不知道,这甚至意味着什么./tmp 中没有文件 #sql_3c6_0.MYI 并且由于某种原因我无法创建带有 # 字符的文件.有没有人听说过或看到过这个错误?可能有什么问题以及需要注意的一些事项?

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?

MySQL 数据库似乎已启动并正在运行,可以通过控制台进行查询,但应用程序似乎无法访问它.应用程序代码/文件没有变化.它只是突然发生了.所以我什至不确定从哪里开始寻找或应用什么解决策略.有什么想法吗?

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?

推荐答案

通常这意味着您的 /tmp 分区空间不足并且无法创建文件,或者出于任何原因由于权限问题,mysqld 进程无法写入该目录.有时,当 selinux 在你的游行队伍中下雨时就是这种情况.

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.

任何需要临时文件"的操作都会默认进入/tmp 目录.您看到的名称只是一些内部随机名称.

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天全站免登陆