如何查询MySQL错误代码

  作者:zhanhailiang 日期:2013-03-08

MySQL专门为错误代码提供perror工具来查询错误代码的含义。

如下:

zhanhailiang@linux-06bq:/usr/local/services/mysql/bin> ./perror --help
./perror Ver 2.11, for linux2.6 (i686)
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 a MySQL error code.
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.
  -a, --all           Print all the error messages and the number.
  -s, --silent        Only print the error message.
  -v, --verbose       Print error code and message (default).
                      (Defaults to on; use --skip-verbose to disable.)
  -V, --version       Displays version information and exits.
 
Variables (--variable-name=value)
and boolean options {FALSE|TRUE}  Value (after reading options)
--------------------------------- ----------------------------------------
all                               FALSE
verbose                           TRUE
zhanhailiang@linux-06bq:/usr/local/services/mysql/bin> ./perror -s 1677
Column %d of table '%-.192s.%-.192s' cannot be converted from type '%-.32s' to type '%-.32s'

官方文档:8.13. perror:解释错误代码

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值