No Image

mysql-5.7 Client Error Codes and Messages

2016-04-05 KENNETH 0

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 [ more… ]

No Image

mysql-5.7 Server Error Codes and Messages

2016-04-05 KENNETH 0

Server Error Codes and Messages MySQL programs have access to several types of error information when the server returns an error. For example, the mysql client program displays errors using the following format: shell> SELECT * FROM no_such_table; ERROR 1146 (42S02): Table ‘test.no_such_table’ doesn’t exist The message displayed contains three types of information: A numeric error code (1146). This number is MySQL-specific and is not portable to other database systems. A five-character SQLSTATE value (’42S02′). The values are taken from ANSI SQL and ODBC and are more standardized. Not all MySQL error numbers have corresponding SQLSTATE values. In these cases, ‘HY000’ (general error) is used. A message string that provides a textual description of the error. For error checking, use error codes, not error messages. Error messages do not change often, but it is possible. Also if the database administrator [ more… ]