perror mysql_MYSQL perror命令的用法 | 学步园

perror命令是MYSQL的一个很有用的工具,它可以帮助用户查找错误信息,当然也可以在线在MYSQL官方网站上查询,或通过BAIDU等搜索引擎查询,但是如果在没有网络的环境下,怎么办呢?这是perror命令就派上用场了。

perror.exe工具默认位于C:/Program Files/MySQL/MySQL Server 5.0/bin目录下。可以通过命令行定位到该目录下,然后执行该命令。也可以直接把C:/Program Files/MySQL/MySQL Server 5.0/bin路径加入到系统环境变量PATH的后边,以后直接在命令行下就可以运行perror程序了。

perror命令的格式如下:

格式为:perror 错误代码

例如,直接输入perror命令,会显示其帮助信息,如下:

D:/>perror

perror Ver 2.10, for Win32 (ia32)

This software comes with ABSOLUTELY NO WARRANTY. This is free software,

and you are welcome to modify and redistribute it under the GPL license

Print a description for a system error code or an error code from

a MyISAM/ISAM/BDB table handler.

If you want to get the error for a negative error code, you should use

-- before the first error code to tell perror that there was no more options.

Usage: perror [OPTIONS] [ERRORCODE [ERRORCODE...]]

-?, --help          Displays this help and exits.

-I, --info          Synonym for --help.

-s, --silent        Only print the error message.

-v, --verbose       Print error code and message (default).

-V, --version       Displays version information and exits.

Variables (--variable-name=value)

and boolean options {FALSE|TRUE}  Value (after reading options)

--------------------------------- -----------------------------

verbose                           TRUE

如果输入perror 135,则显示:

D:/>perror 135

MySQL error code 135: No more room in record file

错误信息意思是没有更多的空间在记录文件。

另外,也可以,同时输入多个错误号码 如:

D:/>perror 132 133

MySQL error code 132: Old database file

MySQL error code 133: No record read before update

总的来说是很方便的,在MYSQL系统出现故障或错误后,一般用户都会去看错误日志,而错误日志里一般都会发现这样的错误编号。这时我们就可以利用这个命令分析到底是哪里出问题了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值