This is a read-only copy of the MariaDB Knowledgebase generated on 2024-12-25. For the latest, interactive version please visit https://mariadb.com/kb/.

perror

perror is a utility that displays descriptions for system or storage engine error codes.

See MariaDB Error Codes for a full list of MariaDB error codes, and Operating System Error Codes for a list of Linux and Windows error codes.

Usage

perror [OPTIONS] [ERRORCODE [ERRORCODE...]]

If you need to describe a negative error code, use -- before the first error code to end the options.

Options

OptionDescription
-?, --helpDisplay help and exit.
-I, --infoSynonym for --help.
-s, --silentOnly print the error message.
-v, --verbosePrint error code and message (default). (Defaults to on; use --skip-verbose to disable.)
-V, --versionDisplays version information and exits.

Examples

System error code:

shell> perror 96
OS error code  96:  Protocol family not supported

MariaDB/MySQL error code:

shell> perror 1005 1006
MySQL error code 1005 (ER_CANT_CREATE_TABLE): Can't create table %`s.%`s (errno: %M)
MySQL error code 1006 (ER_CANT_CREATE_DB): Can't create database '%-.192s' (errno: %M)
shell> perror --silent 1979
You are not owner of query %lu
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.