首页 技术 正文
技术 2022年11月9日
0 收藏 881 点赞 4,620 浏览 2187 个字

 

在MySQL数据库的维护过程中,我们有时候会在MySQL的错误日志文件中看到一些关于Operating system error的错误信息,例如在MySQL的错误日志里面,有时候会看到关于

InnoDB: Operating system error number 0.

InnoDB: Check that your OS and file system support files of this size.

InnoDB: Check also that the disk is not full or a disk quota exceeded.

InnoDB: Operating system error number 5.

…………………………………….

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

[root@DB-Server ~]# perror 2;

OS error code   2:  No such file or directory

[root@DB-Server ~]# perror 3;

OS error code   3:  No such process

[root@DB-Server ~]# perror 4;

OS error code   4:  Interrupted system call

[root@DB-Server ~]# perror 5;

OS error code   5:  Input/output error

[root@DB-Server ~]#

如果你要查看一个范围的Operating system error,可以使用下面命令

[root@DB-Server ~]# 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@DB-Server ~]#

如果是集群,那么可以shell> perror –ndb errorcode查看, 下面表格是关于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

如果是Windows平台,那么也可以使用下面命令查看具体的System Error Code信息,另外,Windows平台下的System Error Code也远比Linux平台下要多,遇到了这些System Error Code,使用命令查看即可。

perror.exe 2

perror `perl -e “print join ‘ ‘,1..100″`

 

参考资料

http://doc.docs.sk/mysql-refman-5.5/operating-system-error-codes.html

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,474
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,889
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,724
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,479
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:8,118
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:5,278