C.2. Client Error Codes and Messages
Client error information comes from the following source files:
The Error values and the symbols in parentheses correspond to definitions in the include/errmsg.h MySQL source file.
The Message values correspond to the error messages that are listed in the libmysql/errmsg.c file. %d and %s represent numbers and strings, respectively, that are substituted into the messages when they are displayed.
Because updates are frequent, it is possible that those files will contain additional error information not listed here.
Error: 2000 (CR_UNKNOWN_ERROR)
Message: Unknown MySQL error
Error: 2001 (CR_SOCKET_CREATE_ERROR)
Message: Can't create UNIX socket (%d)
Error: 2002 (CR_CONNECTION_ERROR)
Message: Can't connect to local MySQL server through socket '%s' (%d)
Error: 2003 (CR_CONN_HOST_ERROR)
Message: Can't connect to MySQL server on '%s' (%d)
Error: 2004 (CR_IPSOCK_ERROR)
Message: Can't create TCP/IP socket (%d)
Error: 2005 (CR_UNKNOWN_HOST)
Message: Unknown MySQL server host '%s' (%d)
Error: 2006 (CR_SERVER_GONE_ERROR)
Message: MySQL server has gone away
Error: 2007 (CR_VERSION_ERROR)
Message: Protocol mismatch; server version = %d, client version = %d
Error: 2008 (CR_OUT_OF_MEMORY)
Message: MySQL client ran out of memory
Error: 2009 (CR_WRONG_HOST_INFO)
Message: Wrong host info
Error: 2010 (CR_LOCALHOST_CONNECTION)
Message: Localhost via UNIX socket
Error: 2011 (CR_TCP_CONNECTION)
Message: %s via TCP/IP
Error: 2012 (CR_SERVER_HANDSHAKE_ERR)
Message: Error in server handshake
Error: 2013 (CR_SERVER_LOST)
Message: Lost connection to MySQL server during query
Error: 2014 (CR_COMMANDS_OUT_OF_SYNC)
Message: Commands out of sync; you can't run this command now
Error: 2015 (CR_NAMEDPIPE_CONNECTION)
Message: Named pipe: %s
Error: 2016 (CR_NAMEDPIPEWAIT_ERROR)
Message: Can't wait for named pipe to host: %s pipe: %s (%lu)
Error: 2017 (CR_NAMEDPIPEOPEN_ERROR)
Message: Can't open named pipe to host: %s pipe: %s (%lu)
Error: 2018 (CR_NAMEDPIPESETSTATE_ERROR)
Message: Can't set state of named pipe to host: %s pipe: %s (%lu)
Error: 2019 (CR_CANT_READ_CHARSET)
Message: Can't initialize character set %s (path: %s)
Error: 2020 (CR_NET_PACKET_TOO_LARGE)
Message: Got packet bigger than 'max_allowed_packet' bytes
Error: 2021 (CR_EMBEDDED_CONNECTION)
Message: Embedded server
Error: 2022 (CR_PROBE_SLAVE_STATUS)
Message: Error on SHOW SLAVE STATUS:
Error: 2023 (CR_PROBE_SLAVE_HOSTS)
Message: Error on SHOW SLAVE HOSTS:
Error: 2024 (CR_PROBE_SLAVE_CONNECT)
Message: Error connecting to slave:
Error: 2025 (CR_PROBE_MASTER_CONNECT)
Message: Error connecting to master:
Error: 2026 (CR_SSL_CONNECTION_ERROR)
Message: SSL connection error
Error: 2027 (CR_MALFORMED_PACKET)
Message: Malformed packet
Error: 2028 (CR_WRONG_LICENSE)
Message: This client library is licensed only for use with MySQL servers having '%s' license
Error: 2029 (CR_NULL_POINTER)
Message: Invalid use of null pointer
Error: 2030 (CR_NO_PREPARE_STMT)
Message: Statement not prepared
Error: 2031 (CR_PARAMS_NOT_BOUND)
Message: No data supplied for parameters in prepared statement
Error: 2032 (CR_DATA_TRUNCATED)
Message: Data truncated
Error: 2033 (CR_NO_PARAMETERS_EXISTS)
Message: No parameters exist in the statement
Error: 2034 (CR_INVALID_PARAMETER_NO)
Message: Invalid parameter number
Error: 2035 (CR_INVALID_BUFFER_USE)
Message: Can't send long data for non-string/non-binary data types (parameter: %d)
Error: 2036 (CR_UNSUPPORTED_PARAM_TYPE)
Message: Using unsupported buffer type: %d (parameter: %d)