angelo.pezzullo
pubblicato più di 2 anni fa

Codici e Messaggi di Errore (Client)

Ecco i codici e le descrizioni degli errori MySQL nei client mysql

A seguire tutti i codici di errore che MySQL lato Client genera.

Le informazioni relative agli errori, (valori e simboli in parentesi), del client sono registrate all’interno del file errmsg.h di MySQL. I valori dei messaggi corrispondono ognuno ad uno specifico errore definito all’interno del file libmysql/errmsg.c, %d and %s rappresentano rispettivamente numeri e stringhe che vengono sostituiti all’interno del messaggio quando esso viene restituito.

In riferimento alla versione 5.0 di MySQL, di seguito riporto i codici di errore e i relativi messaggi che il client di MySQL può restituire.

  1Error: 2000 (CR_UNKNOWN_ERROR)
  2      Message: Unknown MySQL error
  3
  4      Error: 2001 (CR_SOCKET_CREATE_ERROR)
  5      Message: Can't create UNIX socket (%d)
  6
  7      Error: 2002 (CR_CONNECTION_ERROR)
  8      Message: Can't connect to local MySQL server through socket '%s' (%d)
  9
 10      Error: 2003 (CR_CONN_HOST_ERROR)
 11      Message: Can't connect to MySQL server on '%s' (%d)
 12
 13      Error: 2004 (CR_IPSOCK_ERROR)
 14      Message: Can't create TCP/IP socket (%d)
 15
 16      Error: 2005 (CR_UNKNOWN_HOST)
 17      Message: Unknown MySQL server host '%s' (%d)
 18
 19      Error: 2006 (CR_SERVER_GONE_ERROR)
 20      Message: MySQL server has gone away
 21
 22      Error: 2007 (CR_VERSION_ERROR)
 23      Message: Protocol mismatch; server version = %d, client version = %d
 24
 25      Error: 2008 (CR_OUT_OF_MEMORY)
 26      Message: MySQL client ran out of memory
 27
 28      Error: 2009 (CR_WRONG_HOST_INFO)
 29      Message: Wrong host info
 30
 31      Error: 2010 (CR_LOCALHOST_CONNECTION)
 32      Message: Localhost via UNIX socket
 33
 34      Error: 2011 (CR_TCP_CONNECTION)
 35      Message: %s via TCP/IP
 36
 37      Error: 2012 (CR_SERVER_HANDSHAKE_ERR)
 38      Message: Error in server handshake
 39
 40      Error: 2013 (CR_SERVER_LOST)
 41      Message: Lost connection to MySQL server during query
 42
 43      Error: 2014 (CR_COMMANDS_OUT_OF_SYNC)
 44      Message: Commands out of sync; you can't run this command now
 45
 46      Error: 2015 (CR_NAMEDPIPE_CONNECTION)
 47      Message: Named pipe: %s
 48
 49      Error: 2016 (CR_NAMEDPIPEWAIT_ERROR)
 50      Message: Can't wait for named pipe to host: %s pipe: %s (%lu)
 51
 52      Error: 2017 (CR_NAMEDPIPEOPEN_ERROR)
 53      Message: Can't open named pipe to host: %s pipe: %s (%lu)
 54
 55      Error: 2018 (CR_NAMEDPIPESETSTATE_ERROR)
 56      Message: Can't set state of named pipe to host: %s pipe: %s (%lu)
 57
 58      Error: 2019 (CR_CANT_READ_CHARSET)
 59      Message: Can't initialize character set %s (path: %s)
 60
 61      Error: 2020 (CR_NET_PACKET_TOO_LARGE)
 62      Message: Got packet bigger than 'max_allowed_packet' bytes
 63
 64      Error: 2021 (CR_EMBEDDED_CONNECTION)
 65      Message: Embedded server
 66
 67      Error: 2022 (CR_PROBE_SLAVE_STATUS)
 68      Message: Error on SHOW SLAVE STATUS:
 69
 70      Error: 2023 (CR_PROBE_SLAVE_HOSTS)
 71      Message: Error on SHOW SLAVE HOSTS:
 72
 73      Error: 2024 (CR_PROBE_SLAVE_CONNECT)
 74      Message: Error connecting to slave:
 75
 76      Error: 2025 (CR_PROBE_MASTER_CONNECT)
 77      Message: Error connecting to master:
 78
 79      Error: 2026 (CR_SSL_CONNECTION_ERROR)
 80      Message: SSL connection error
 81
 82      Error: 2027 (CR_MALFORMED_PACKET)
 83      Message: Malformed packet
 84
 85      Error: 2028 (CR_WRONG_LICENSE)
 86      Message: This client library is licensed only for use 
 87      with MySQL servers having '%s' license
 88
 89      Error: 2029 (CR_NULL_POINTER)
 90      Message: Invalid use of null pointer
 91
 92      Error: 2030 (CR_NO_PREPARE_STMT)
 93      Message: Statement not prepared
 94
 95      Error: 2031 (CR_PARAMS_NOT_BOUND)
 96      Message: No data supplied for parameters in prepared statement
 97
 98      Error: 2032 (CR_DATA_TRUNCATED)
 99      Message: Data truncated
100
101      Error: 2033 (CR_NO_PARAMETERS_EXISTS)
102      Message: No parameters exist in the statement
103
104      Error: 2034 (CR_INVALID_PARAMETER_NO)
105      Message: Invalid parameter number
106
107      Error: 2035 (CR_INVALID_BUFFER_USE)
108      Message: Can't send long data for non-string/non-binary 
109      data types (parameter: %d)
110
111      Error: 2036 (CR_UNSUPPORTED_PARAM_TYPE)
112      Message: Using unsupported buffer type: %d (parameter: %d)
113
114      Error: 2037 (CR_SHARED_MEMORY_CONNECTION)
115      Message: Shared memory: %s
116
117      Error: 2038 (CR_SHARED_MEMORY_CONNECT_REQUEST_ERROR)
118      Message: Can't open shared memory; client could not create 
119      request event (%lu)
120
121      Error: 2039 (CR_SHARED_MEMORY_CONNECT_ANSWER_ERROR)
122      Message: Can't open shared memory; no answer event received 
123      from server (%lu)
124
125      Error: 2040 (CR_SHARED_MEMORY_CONNECT_FILE_MAP_ERROR)
126      Message: Can't open shared memory; server could not allocate 
127      file mapping (%lu)
128
129      Error: 2041 (CR_SHARED_MEMORY_CONNECT_MAP_ERROR)
130      Message: Can't open shared memory; server could not get pointer 
131      to file mapping (%lu)
132
133      Error: 2042 (CR_SHARED_MEMORY_FILE_MAP_ERROR)
134      Message: Can't open shared memory; client could not allocate 
135      file mapping (%lu)
136
137      Error: 2043 (CR_SHARED_MEMORY_MAP_ERROR)
138      Message: Can't open shared memory; client could not get pointer 
139      to file mapping (%lu)
140
141      Error: 2044 (CR_SHARED_MEMORY_EVENT_ERROR)
142      Message: Can't open shared memory; client could not create %s 
143      event (%lu)
144
145      Error: 2045 (CR_SHARED_MEMORY_CONNECT_ABANDONED_ERROR)
146      Message: Can't open shared memory; no answer from server (%lu)
147
148      Error: 2046 (CR_SHARED_MEMORY_CONNECT_SET_ERROR)
149      Message: Can't open shared memory; cannot send request event 
150      to server (%lu)
151
152      Error: 2047 (CR_CONN_UNKNOW_PROTOCOL)
153      Message: Wrong or unknown protocol
154
155      Error: 2048 (CR_INVALID_CONN_HANDLE)
156      Message: Invalid connection handle
157
158      Error: 2049 (CR_SECURE_AUTH)
159      Message: Connection using old (pre-4.1.1) authentication 
160      protocol refused (client option 'secure_auth' enabled)
161
162      Error: 2050 (CR_FETCH_CANCELED)
163      Message: Row retrieval was canceled by mysql_stmt_close() call
164
165      Error: 2051 (CR_NO_DATA)
166      Message: Attempt to read column without prior row fetch
167
168      Error: 2052 (CR_NO_STMT_METADATA)
169      Message: Prepared statement contains no metadata
170
171      Error: 2053 (CR_NO_RESULT_SET)
172      Message: Attempt to read a row while there is no result set 
173      associated with the statement
174
175      Error: 2054 (CR_NOT_IMPLEMENTED)
176      Message: This feature is not implemented yet
177
178      Error: 2055 (CR_SERVER_LOST_EXTENDED)
179      Message: Lost connection to MySQL server at '%s'

Condividi su:

Esprimi un voto:

  • Current rating: 0.0/5
  • 1
  • 2
  • 3
  • 4
  • 5

Argomenti chiave:

Ultimi commenti Ultimi commenti

Esegui il Login oppure registrati per scrivere un commento.
Cerca nel sito...
Ultime recipes

Un utilissimo tool di shell che effettua un dettagliato e comodo report su MySQL MySQL Report un tool di shell per tenere tutto sotto controllo

Un utilissimo tool di shell che effettua un dettagliato e comodo report su MySQL


Vai alla recipe

Un utilissimo tool per sniffare il traffico Client/Server TCP/IP di MySQL MySQLSniffer sniffare il traffico TCP di MySQL

Un utilissimo tool per sniffare il traffico Client/Server TCP/IP di MySQL


Vai alla recipe

Verificare l'integrità, riparare gestire chiavi e memoria di tabelle MyISAM attraverso myisamchk riparare file MyISAM

Verificare l'integrità, riparare gestire chiavi e memoria di tabelle MyISAM attraverso il file myisamchk


Vai alla recipe

Un tool per comprimere le tabelle MyISAM fino a oltre il 50% myisampack comprimere file MyISAM

Un tool per comprimere le tabelle MyISAM fino a oltre il 50%


Vai alla recipe

mysqlshow le info di base sui database, tabelle e colonne senza utilizzare alcun mysqlshow visualizzare le informazioni sul database MySQL

mysqlshow le info di base sui database, tabelle e colonne senza utilizzare alcun client


Vai alla recipe

Utilizzando UNION / UNION ALL su campi int unsigned zerofill,
ho notato che MysqlUNION / UNION ALL su campi int unsigned zerofill. di DebUsr
Vai al tip

Utilizzo di funzioni come alias di campo tramite l'impiego di prepared statementReport con alias di campo dinamici di john_revelator
Vai al tip

Può capitare che sia necessario eseguire un dump di database in formato Comma SeparatedEsecuzione dump in formato CSV (tabelle in engine MyIsam esportate in formato CSV) di ghigomatto
Vai al tip

E' possibile eseguire le query SQL contenute in un file di testo. Questo è utileEseguire le query da un file di testo di Sante Caserio
Vai al tip

Se vogliamo fare il backup di tutti i database con mysqldump, e ne abbiamo parecchiFare il backup di tutti i database di Sante Caserio
Vai al tip

Salve,vorrei chiedervi un aiutino per una query che mi infastidisce un pò.
Ho 4 aiuto per una query! di fighterdorico Vai al topic

Salve,vorrei chiedervi un aiutino per una query che mi infastidisce un pò.
Ho 4 aiuto per una query! di fighterdorico Vai al topic

Salve,vorrei chiedervi un aiutino per una query che mi infastidisce un pò.
Ho 4 aiuto per una query! di fighterdorico Vai al topic

Salve a tutti.

Ho una tabella con lettere accentate.
Le lettere vengono visualizzate ordinamento tabelle di ditch Vai al topic

Salve a tutti.

Ho una tabella con lettere accentate.
Le lettere vengono visualizzate ordinamento tabelle di ditch Vai al topic