Documented MySQL 5.5 Client Errors

from the Artful MySQL Tips List

Here is a tabulation of known MySQL client error codes, numbers and messages. Many are self-explanatory. Some aren't, and that's what the Notes column is for. If you would like to contribute info, please click here.

Error No.Error CodeError Message or ConditionNotes
NonePassword fails when entered on the command line
2000CR_UNKNOWN_ERRORUnknown MySQL error
2001CR_SOCKET_CREATE_ERRORCan't create UNIX socket (#)
2002CR_CONNECTION_ERRORCan't connect to local MySQL server through socket 'str' (#)
2003CR_CONN_HOST_ERRORCan't connect to MySQL server on 'str' (#)
2004CR_IPSOCK_ERRORCan't create TCP/IP socket (#)
2005CR_UNKNOWN_HOSTUnknown MySQL server host 'str' (#)
2006CR_SERVER_GONE_ERRORMySQL server has gone away
2007CR_VERSION_ERRORProtocol mismatch; server version = #, client version = #
2008CR_OUT_OF_MEMORYMySQL client ran out of memory
2009CR_WRONG_HOST_INFOWrong host info
2010CR_LOCALHOST_CONNECTIONLocalhost via UNIX socket
2012CR_SERVER_HANDSHAKE_ERRError in server handshake
2013CR_SERVER_LOSTLost connection to MySQL server during query
2014CR_COMMANDS_OUT_OF_SYNCCommands out of sync; you can't run this command now
2016CR_NAMEDPIPEWAIT_ERRORCan't wait for named pipe to host: str pipe: str (%lu)
2017CR_NAMEDPIPEOPEN_ERRORCan't open named pipe to host: str pipe: str (%lu)
2018CR_NAMEDPIPESETSTATE_ERRORCan't set state of named pipe to host: str pipe: str (%lu)
2019CR_CANT_READ_CHARSETCan't initialize character set str (path: str)
2020CR_NET_PACKET_TOO_LARGEGot packet bigger than 'max_allowed_packet' bytes
2024CR_PROBE_SLAVE_CONNECTError connecting to slave:
2025CR_PROBE_MASTER_CONNECTError connecting to master:
2026CR_SSL_CONNECTION_ERRORSSL connection error
2027CR_MALFORMED_PACKETMalformed packet
2028CR_WRONG_LICENSEThis client library is licensed only for use with MySQL servers having 'str' license
2029CR_NULL_POINTERInvalid use of null pointer
2030CR_NO_PREPARE_STMTStatement not prepared
2031CR_PARAMS_NOT_BOUNDNo data supplied for parameters in prepared statement
2032CR_DATA_TRUNCATEDData truncated
2033CR_NO_PARAMETERS_EXISTSNo parameters exist in the statement
2034CR_INVALID_PARAMETER_NOInvalid parameter number
2035CR_INVALID_BUFFER_USECan't send long data for non-string/non-binary data types (parameter: #)
2036CR_UNSUPPORTED_PARAM_TYPEUsing unsupported buffer type: # (parameter: #)
2038CR_SHARED_MEMORY_CONNECT_REQUESTCan't open shared memory; client could not create request event (%lu)
2039CR_SHARED_MEMORY_CONNECT_ANSWER_Can't open shared memory; no answer event received from server (%lu)
2040CR_SHARED_MEMORY_CONNECT_FILE_MACan't open shared memory; server could not allocate file mapping (%lu)
2041CR_SHARED_MEMORY_CONNECT_MAP_ERRCan't open shared memory; server could not get pointer to file mapping (%lu)
2042CR_SHARED_MEMORY_FILE_MAP_ERRORCan't open shared memory; client could not allocate file mapping (%lu)
2043CR_SHARED_MEMORY_MAP_ERRORCan't open shared memory; client could not get pointer to file mapping (%lu)
2044CR_SHARED_MEMORY_EVENT_ERRORCan't open shared memory; client could not create str event (%lu)
2045CR_SHARED_MEMORY_CONNECT_ABANDONCan't open shared memory; no answer from server (%lu)
2046CR_SHARED_MEMORY_CONNECT_SET_ERRCan't open shared memory; cannot send request event to server (%lu)
2047CR_CONN_UNKNOW_PROTOCOLWrong or unknown protocol
2048CR_INVALID_CONN_HANDLEInvalid connection handle
2049CR_SECURE_AUTHConnection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)
2050CR_FETCH_CANCELEDRow retrieval was canceled by mysql_stmt_close() call
2051CR_NO_DATAAttempt to read column without prior row fetch
2052CR_NO_STMT_METADATAPrepared statement contains no metadata
2053CR_NO_RESULT_SETAttempt to read a row while there is no result set associated with the statement
2054CR_NOT_IMPLEMENTEDThis feature is not implemented yet
2055CR_SERVER_LOST_EXTENDEDLost connection to MySQL server at 'str', system #
2056CR_STMT_CLOSEDStatement closed indirectly because of a preceeding str() call
2057CR_NEW_STMT_METADATAThe number of columns in the result set differs from the number of bound buffers. You must reset the statement, rebind the result set columns, and execute the statement again
2058CR_ALREADY_CONNECTEDThis handle is already connected. Use a separate handle for each connection.

Return to the Artful MySQL tips page