MySQL下perror工具查看System Error Code信息
在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 |
Oracle案例04——ORA-39700: database must be opened with UPGRADE option
版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。
|
下一篇: Caesar密码
发表评论