Can't create/write to file '/tmp/MYmZiY2i' 报错解决方法

本文详细解析了Linux系统中常见的错误代码,如Nosuchfileordirectory(2),Nospaceleftondevice(28),Toomanylinks(31)等,并通过MySQL的perror命令演示了如何查询错误代码的具体含义,帮助读者理解并解决系统错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

错误日志:

Cause: java.sql.SQLException: Can't create/write to file '/tmp/MYmZiY2i' (Errcode: 28 - No space left on device)\n; SQL []

重点内容:Errcode: 28 - No space left on device

 那么这些System Error Code在Linux下分别代表什么意思呢?其实如果遇到错误日志里有这些对应的代码,使用MySQL自带的命令工具perror查看一下具体信息即可。非常简单方便。


[root@localhost ~]# perror 2
OS error code   2:  No such file or directory
[root@localhost ~]# perror 28
OS error code  28:  No space left on device
[root@localhost ~]# perror 31
OS error code  31:  Too many links
#如果你要查看一个范围的Operating system error,可以使用下面命令
[root@localhost ~]# perror `seq 0 10`
OS error code   0:  Success
OS error code   1:  Operation not permitted
OS error code   2:  No such file or directory
OS error code   3:  No such process
OS error code   4:  Interrupted system call
OS error code   5:  Input/output error
OS error code   6:  No such device or address
OS error code   7:  Argument list too long
OS error code   8:  Exec format error
OS error code   9:  Bad file descriptor
OS error code  10:  No child processes
[root@localhost ~]#

下面表格是关于Linux平台下通用的System Error Code列表 

Number

Macro

Description

1

EPERM

Operation not permitted

2

ENOENT

No such file or directory

3

ESRCH

No such process

4

EINTR

Interrupted system call

5

EIO

I/O error

6

ENXIO

No such device or address

7

E2BIG

Arg list too long

8

ENOEXEC

Exec format error

9

EBADF

Bad file number

10

ECHILD

No child processes

11

EAGAIN

Try again

12

ENOMEM

Out of memory

13

EACCES

Permission denied

14

EFAULT

Bad address

15

ENOTBLK

Block device required

16

EBUSY

Device or resource busy

17

EEXIST

File exists

18

EXDEV

Cross-device link

19

ENODEV

No such device

20

ENOTDIR

Not a directory

21

EISDIR

Is a directory

22

EINVAL

Invalid argument

23

ENFILE

File table overflow

24

EMFILE

Too many open files

25

ENOTTY

Inappropriate ioctl for device

26

ETXTBSY

Text file busy

27

EFBIG

File too large

28

ENOSPC

No space left on device

29

ESPIPE

Illegal seek

30

EROFS

Read-only file system

31

EMLINK

Too many links

另:今天的报错信息是No space left on device原因是磁盘空间满了或缓存空间满了

重启了mysql后就好了

mysql 命令

service mysqld start启动

service mysqld restart 重启

service mysqld status 当前状态

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

javafanwk

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

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

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

打赏作者

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

抵扣说明:

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

余额充值