Appendix B Errors, Error Codes, and Common Problems

Table of Contents

B.1 Error Message Sources and Components
B.2 Error Information Interfaces
B.3 Error Message Reference
B.3.1 Server Error Message Reference
B.3.2 Client Error Message Reference
B.3.3 Global Error Message Reference
B.4 Problems and Common Errors
B.4.1 How to Determine What Is Causing a Problem
B.4.2 Common Errors When Using MySQL Programs
B.4.3 Administration-Related Issues
B.4.4 Query-Related Issues
B.4.5 Optimizer-Related Issues
B.4.6 Table Definition-Related Issues
B.4.7 Known Issues in MySQL

This appendix describes the types of error information MySQL provides and how to obtain information about them. It also lists the error messages that the MySQL server and MySQL client programs generate. The final section is for troubleshooting. It describes common problems and errors that may occur and potential resolutions.

Additional Resources

Other sections that discuss error-related topics include:

B.1 Error Message Sources and Components

This section discusses how error messages originate within MySQL and the components they contain.

Error Message Sources

Error messages can originate on the server side or the client side:

  • On the server side, error messages may occur during the startup and shutdown processes, as a result of issues that occur during SQL statement execution, and so forth.

    • The MySQL server writes some error messages to its error log. These indicate issues of interest to database administrators or that require DBA action.

    • The server sends other error messages to client programs. These indicate issues pertaining only to a particular client. The MySQL client library takes errors received from the server and makes them available to the host client program.

  • Client-side error messages are generated from within the MySQL client library, usually involving problems communicating with the server.

Example server-side error messages written to the error log:

  • This message produced during the startup process provides a status or progress indicator:

    181009  7:43:37 [Note] Event Scheduler: scheduler
    thread started with id 1
    
  • This message indicates an issue that requires DBA action:

    181009 3:20:39 [ERROR] Can't open the mysql.plugin
    table. Please run mysql_upgrade to create it.
    

Example server-side error message sent to client programs, as displayed by the mysql client:

mysql> SELECT * FROM no_such_table;
ERROR 1146 (42S02): Table 'test.no_such_table' doesn't exist

Example client-side error message originating from within the client library, as displayed by the mysql client:

shell> mysql -h no-such-host
ERROR 2005 (HY000): Unknown MySQL server host 'no-such-host' (0)

Whether an error originates from within the client library or is received from the server, a MySQL client program may respond in varying ways. As just illustrated, the client may display the error message so the user can take corrective measures. The client may instead internally attempt to resolve or retry a failed operation, or take other action.

Error Message Components

When an error occurs, error information includes several components: an error code, SQLSTATE value, and message string. These components have the following characteristics:

  • Error code: This value is numeric. It is MySQL-specific and is not portable to other database systems.

    Each error number has a corresponding symbolic value. Examples:

    Error codes are stable across General Availability (GA) releases of a given MySQL series. Before a series reaches GA status, new codes may still be under development and are subject to change.

  • SQLSTATE value: This value is a five-character string (for example, '42S02'). SQLSTATE values are taken from ANSI SQL and ODBC and are more standardized than the numeric error codes. The first two characters of an SQLSTATE value indicate the error class:

    • Class = '00' indicates success.

    • Class = '01' indicates a warning.

    • Class = '02' indicates not found. This is relevant within the context of cursors and is used to control what happens when a cursor reaches the end of a data set. This condition also occurs for SELECT ... INTO var_list statements that retrieve no rows.

    • Class > '02' indicates an exception.

    For server-side errors, not all MySQL error numbers have corresponding SQLSTATE values. In these cases, 'HY000' (general error) is used.

    For client-side errors, the SQLSTATE value is always 'HY000' (general error), so it is not meaningful for distinguishing one client error from another.

  • Message string: This string provides a textual description of the error.

B.2 Error Information Interfaces

Error messages can originate on the server side or the client side, and each error message includes an error code, SQLSTATE value, and message string, as described in Section B.1, “Error Message Sources and Components”. For lists of server-side, client-side, and global (shared between server and clients) errors, see Section B.3, “Error Message Reference”.

For error checking from within programs, use error code numbers or symbols, not error message strings. Message strings do not change often, but it is possible. Also, if the database administrator changes the language setting, that affects the language of message strings; see Section 10.12, “Setting the Error Message Language”.

Error information in MySQL is available in the server error log, at the SQL level, from within client programs, and at the command line.

Error Log

On the server side, some messages are intended for the error log. For information about configuring where and how the server writes the log, see Section 5.4.2, “The Error Log”.

Other server error messages are intended to be sent to client programs and are available as described in Client Error Message Interface.

SQL Error Message Interface

At the SQL level, there are several sources of error information in MySQL:

  • SQL statement warning and error information is available through the SHOW WARNINGS and SHOW ERRORS statements. The warning_count system variable indicates the number of errors, warnings, and notes (with notes excluded if the sql_notes system variable is disabled). The error_count system variable indicates the number of errors. Its value excludes warnings and notes.

  • SHOW SLAVE STATUS statement output includes information about replication errors occurring on replication slave servers.

  • SHOW ENGINE INNODB STATUS statement output includes information about the most recent foreign key error if a CREATE TABLE statement for an InnoDB table fails.

Client Error Message Interface

Client programs receive errors from two sources:

  • Errors that originate on the client side from within the MySQL client library.

  • Errors that originate on the server side and are sent to the client by the server. These are received within the client library, which makes them available to the host client program.

Regardless of whether an error originates from within the client library or is received from the server, a MySQL client program obtains the error code, SQLSTATE value, message string, and other related information by calling C API functions in the client library:

For descriptions of the client library error functions, see Section 23.7, “MySQL C API”.

A MySQL client program may respond to an error in varying ways. The client may display the error message so the user can take corrective measures, internally attempt to resolve or retry a failed operation, or take other action. For example, (using the mysql client), a failure to connect to the server might result in this message:

shell> mysql -h no-such-host
ERROR 2005 (HY000): Unknown MySQL server host 'no-such-host' (0)

Command-Line Error Message Interface

The perror program provides information from the command line about error numbers. See Section 4.8.1, “perror — Display MySQL Error Message Information”.

shell> perror 1231
MySQL error code 1231 (ER_WRONG_VALUE_FOR_VAR): Variable '%-.64s' can't
be set to the value of '%-.200s'

B.3 Error Message Reference

This section provides a reference for the various types of error messages in MySQL:

B.3.1 Server Error Message Reference

The MySQL server writes some error messages to its error log, and sends others to client programs.

Example server-side error messages written to the error log:

181009  7:43:37 [Note] Event Scheduler: scheduler
thread started with id 1

181009 3:20:39 [ERROR] Can't open the mysql.plugin
table. Please run mysql_upgrade to create it.

Example server-side error message sent to client programs, as displayed by the mysql client:

mysql> SELECT * FROM no_such_table;
ERROR 1146 (42S02): Table 'test.no_such_table' doesn't exist

Each server error message includes an error code, SQLSTATE value, and message string, as described in Section B.1, “Error Message Sources and Components”. These components are available as described in Section B.2, “Error Information Interfaces”.

In addition to the errors in the following list, the server can also produce error messages that have error codes in the range from 1 to 999. See Section B.3.3, “Global Error Message Reference”

  • Error number: 1000; Symbol: ER_HASHCHK; SQLSTATE: HY000

    Message: hashchk

    Unused.

  • Error number: 1001; Symbol: ER_NISAMCHK; SQLSTATE: HY000

    Message: isamchk

    Unused.

  • Error number: 1002; Symbol: ER_NO; SQLSTATE: HY000

    Message: NO

    Used in the construction of other messages.

  • Error number: 1003; Symbol: ER_YES; SQLSTATE: HY000

    Message: YES

    Used in the construction of other messages.

    Extended EXPLAIN format generates Note messages. ER_YES is used in the Code column for these messages in subsequent SHOW WARNINGS output.

  • Error number: 1004; Symbol: ER_CANT_CREATE_FILE; SQLSTATE: HY000

    Message: Can't create file '%s' (errno: %d)

    Occurs for failure to create or copy a file needed for some operation.

    Possible causes: Permissions problem for source file; destination file already exists but is not writeable.

  • Error number: 1005; Symbol: ER_CANT_CREATE_TABLE; SQLSTATE: HY000

    Message: Can't create table '%s' (errno: %d)

    InnoDB reports this error when a table cannot be created. If the error message refers to error 150, table creation failed because a foreign key constraint was not correctly formed. If the error message refers to error −1, table creation probably failed because the table includes a column name that matched the name of an internal InnoDB table.

  • Error number: 1006; Symbol: ER_CANT_CREATE_DB; SQLSTATE: HY000

    Message: Can't create database '%s' (errno: %d)

  • Error number: 1007; Symbol: ER_DB_CREATE_EXISTS; SQLSTATE: HY000

    Message: Can't create database '%s'; database exists

    An attempt to create a database failed because the database already exists.

    Drop the database first if you really want to replace an existing database, or add an IF NOT EXISTS clause to the CREATE DATABASE statement if to retain an existing database without having the statement produce an error.

  • Error number: 1008; Symbol: ER_DB_DROP_EXISTS; SQLSTATE: HY000

    Message: Can't drop database '%s'; database doesn't exist

  • Error number: 1009; Symbol: ER_DB_DROP_DELETE; SQLSTATE: HY000

    Message: Error dropping database (can't delete '%s', errno: %d)

  • Error number: 1010; Symbol: ER_DB_DROP_RMDIR; SQLSTATE: HY000

    Message: Error dropping database (can't rmdir '%s', errno: %d)

  • Error number: 1011; Symbol: ER_CANT_DELETE_FILE; SQLSTATE: HY000

    Message: Error on delete of '%s' (errno: %d)

  • Error number: 1012; Symbol: ER_CANT_FIND_SYSTEM_REC; SQLSTATE: HY000

    Message: Can't read record in system table

    Returned by InnoDB for attempts to access InnoDB INFORMATION_SCHEMA tables when InnoDB is unavailable.

  • Error number: 1013; Symbol: ER_CANT_GET_STAT; SQLSTATE: HY000

    Message: Can't get status of '%s' (errno: %d)

  • Error number: 1014; Symbol: ER_CANT_GET_WD; SQLSTATE: HY000

    Message: Can't get working directory (errno: %d)

  • Error number: 1015; Symbol: ER_CANT_LOCK; SQLSTATE: HY000

    Message: Can't lock file (errno: %d)

  • Error number: 1016; Symbol: ER_CANT_OPEN_FILE; SQLSTATE: HY000

    Message: Can't open file: '%s' (errno: %d)

    InnoDB reports this error when the table from the InnoDB data files cannot be found, even though the .frm file for the table exists. See Section 14.23.3, “Troubleshooting InnoDB Data Dictionary Operations”.

  • Error number: 1017; Symbol: ER_FILE_NOT_FOUND; SQLSTATE: HY000

    Message: Can't find file: '%s' (errno: %d)

  • Error number: 1018; Symbol: ER_CANT_READ_DIR; SQLSTATE: HY000

    Message: Can't read dir of '%s' (errno: %d)

  • Error number: 1019; Symbol: ER_CANT_SET_WD; SQLSTATE: HY000

    Message: Can't change dir to '%s' (errno: %d)

  • Error number: 1020; Symbol: ER_CHECKREAD; SQLSTATE: HY000

    Message: Record has changed since last read in table '%s'

  • Error number: 1021; Symbol: ER_DISK_FULL; SQLSTATE: HY000

    Message: Disk full (%s); waiting for someone to free some space...

  • Error number: 1022; Symbol: ER_DUP_KEY; SQLSTATE: 23000

    Message: Can't write; duplicate key in table '%s'

  • Error number: 1023; Symbol: ER_ERROR_ON_CLOSE; SQLSTATE: HY000

    Message: Error on close of '%s' (errno: %d)

  • Error number: 1024; Symbol: ER_ERROR_ON_READ; SQLSTATE: HY000

    Message: Error reading file '%s' (errno: %d)

  • Error number: 1025; Symbol: ER_ERROR_ON_RENAME; SQLSTATE: HY000

    Message: Error on rename of '%s' to '%s' (errno: %d)

    InnoDB reports this error if you attempt to drop the last index that can enforce a particular referential constraint. As of MySQL 5.5, this error message is replaced by ERROR 1553.

  • Error number: 1026; Symbol: ER_ERROR_ON_WRITE; SQLSTATE: HY000

    Message: Error writing file '%s' (errno: %d)

  • Error number: 1027; Symbol: ER_FILE_USED; SQLSTATE: HY000

    Message: '%s' is locked against change

  • Error number: 1028; Symbol: ER_FILSORT_ABORT; SQLSTATE: HY000

    Message: Sort aborted

  • Error number: 1029; Symbol: ER_FORM_NOT_FOUND; SQLSTATE: HY000

    Message: View '%s' doesn't exist for '%s'

  • Error number: 1030; Symbol: ER_GET_ERRNO; SQLSTATE: HY000

    Message: Got error %d from storage engine

    Check the %d value to see what the OS error means. For example, 28 indicates that you have run out of disk space.

  • Error number: 1031; Symbol: ER_ILLEGAL_HA; SQLSTATE: HY000

    Message: Table storage engine for '%s' doesn't have this option

  • Error number: 1032; Symbol: ER_KEY_NOT_FOUND; SQLSTATE: HY000

    Message: Can't find record in '%s'

  • Error number: 1033; Symbol: ER_NOT_FORM_FILE; SQLSTATE: HY000

    Message: Incorrect information in file: '%s'

  • Error number: 1034; Symbol: ER_NOT_KEYFILE; SQLSTATE: HY000

    Message: Incorrect key file for table '%s'; try to repair it

  • Error number: 1035; Symbol: ER_OLD_KEYFILE; SQLSTATE: HY000

    Message: Old key file for table '%s'; repair it!

  • Error number: 1036; Symbol: ER_OPEN_AS_READONLY; SQLSTATE: HY000

    Message: Table '%s' is read only

  • Error number: 1037; Symbol: ER_OUTOFMEMORY; SQLSTATE: HY001

    Message: Out of memory; restart server and try again (needed %d bytes)

  • Error number: 1038; Symbol: ER_OUT_OF_SORTMEMORY; SQLSTATE: HY001

    Message: Out of sort memory, consider increasing server sort buffer size

  • Error number: 1039; Symbol: ER_UNEXPECTED_EOF; SQLSTATE: HY000

    Message: Unexpected EOF found when reading file '%s' (errno: %d)

  • Error number: 1040; Symbol: ER_CON_COUNT_ERROR; SQLSTATE: 08004

    Message: Too many connections

  • Error number: 1041; Symbol: ER_OUT_OF_RESOURCES; SQLSTATE: HY000

    Message: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space

  • Error number: 1042; Symbol: ER_BAD_HOST_ERROR; SQLSTATE: 08S01

    Message: Can't get hostname for your address

  • Error number: 1043; Symbol: ER_HANDSHAKE_ERROR; SQLSTATE: 08S01

    Message: Bad handshake

  • Error number: 1044; Symbol: ER_DBACCESS_DENIED_ERROR; SQLSTATE: 42000

    Message: Access denied for user '%s'@'%s' to database '%s'

  • Error number: 1045; Symbol: ER_ACCESS_DENIED_ERROR; SQLSTATE: 28000

    Message: Access denied for user '%s'@'%s' (using password: %s)

  • Error number: 1046; Symbol: ER_NO_DB_ERROR; SQLSTATE: 3D000

    Message: No database selected

  • Error number: 1047; Symbol: ER_UNKNOWN_COM_ERROR; SQLSTATE: 08S01

    Message: Unknown command

  • Error number: 1048; Symbol: ER_BAD_NULL_ERROR; SQLSTATE: 23000

    Message: Column '%s' cannot be null

  • Error number: 1049; Symbol: ER_BAD_DB_ERROR; SQLSTATE: 42000

    Message: Unknown database '%s'

  • Error number: 1050; Symbol: ER_TABLE_EXISTS_ERROR; SQLSTATE: 42S01

    Message: Table '%s' already exists

  • Error number: 1051; Symbol: ER_BAD_TABLE_ERROR; SQLSTATE: 42S02

    Message: Unknown table '%s'

  • Error number: 1052; Symbol: ER_NON_UNIQ_ERROR; SQLSTATE: 23000

    Message: Column '%s' in %s is ambiguous

    %s = column name
    %s = location of column (for example, "field list")
    

    Likely cause: A column appears in a query without appropriate qualification, such as in a select list or ON clause.

    Examples:

    mysql> SELECT i FROM t INNER JOIN t AS t2;
    ERROR 1052 (23000): Column 'i' in field list is ambiguous
    
    mysql> SELECT * FROM t LEFT JOIN t AS t2 ON i = i;
    ERROR 1052 (23000): Column 'i' in on clause is ambiguous
    

    Resolution:

    • Qualify the column with the appropriate table name:

      mysql> SELECT t2.i FROM t INNER JOIN t AS t2;
      
    • Modify the query to avoid the need for qualification:

      mysql> SELECT * FROM t LEFT JOIN t AS t2 USING (i);
      
  • Error number: 1053; Symbol: ER_SERVER_SHUTDOWN; SQLSTATE: 08S01

    Message: Server shutdown in progress

  • Error number: 1054; Symbol: ER_BAD_FIELD_ERROR; SQLSTATE: 42S22

    Message: Unknown column '%s' in '%s'

  • Error number: 1055; Symbol: ER_WRONG_FIELD_WITH_GROUP; SQLSTATE: 42000

    Message: '%s' isn't in GROUP BY

  • Error number: 1056; Symbol: ER_WRONG_GROUP_FIELD; SQLSTATE: 42000

    Message: Can't group on '%s'

  • Error number: 1057; Symbol: ER_WRONG_SUM_SELECT; SQLSTATE: 42000

    Message: Statement has sum functions and columns in same statement

  • Error number: 1058; Symbol: ER_WRONG_VALUE_COUNT; SQLSTATE: 21S01

    Message: Column count doesn't match value count

  • Error number: 1059; Symbol: ER_TOO_LONG_IDENT; SQLSTATE: 42000

    Message: Identifier name '%s' is too long

  • Error number: 1060; Symbol: ER_DUP_FIELDNAME; SQLSTATE: 42S21

    Message: Duplicate column name '%s'

  • Error number: 1061; Symbol: ER_DUP_KEYNAME; SQLSTATE: 42000

    Message: Duplicate key name '%s'

  • Error number: 1062; Symbol: ER_DUP_ENTRY; SQLSTATE: 23000

    Message: Duplicate entry '%s' for key %d

    The message returned with this error uses the format string for ER_DUP_ENTRY_WITH_KEY_NAME.

  • Error number: 1063; Symbol: ER_WRONG_FIELD_SPEC; SQLSTATE: 42000

    Message: Incorrect column specifier for column '%s'

  • Error number: 1064; Symbol: ER_PARSE_ERROR; SQLSTATE: 42000

    Message: %s near '%s' at line %d

  • Error number: 1065; Symbol: ER_EMPTY_QUERY; SQLSTATE: 42000

    Message: Query was empty

  • Error number: 1066; Symbol: ER_NONUNIQ_TABLE; SQLSTATE: 42000

    Message: Not unique table/alias: '%s'

  • Error number: 1067; Symbol: ER_INVALID_DEFAULT; SQLSTATE: 42000

    Message: Invalid default value for '%s'

  • Error number: 1068; Symbol: ER_MULTIPLE_PRI_KEY; SQLSTATE: 42000

    Message: Multiple primary key defined

  • Error number: 1069; Symbol: ER_TOO_MANY_KEYS; SQLSTATE: 42000

    Message: Too many keys specified; max %d keys allowed

  • Error number: 1070; Symbol: ER_TOO_MANY_KEY_PARTS; SQLSTATE: 42000

    Message: Too many key parts specified; max %d parts allowed

  • Error number: 1071; Symbol: ER_TOO_LONG_KEY; SQLSTATE: 42000

    Message: Specified key was too long; max key length is %d bytes

  • Error number: 1072; Symbol: ER_KEY_COLUMN_DOES_NOT_EXITS; SQLSTATE: 42000

    Message: Key column '%s' doesn't exist in table

  • Error number: 1073; Symbol: ER_BLOB_USED_AS_KEY; SQLSTATE: 42000

    Message: BLOB column '%s' can't be used in key specification with the used table type

  • Error number: 1074; Symbol: ER_TOO_BIG_FIELDLENGTH; SQLSTATE: 42000

    Message: Column length too big for column '%s' (max = %lu); use BLOB or TEXT instead

  • Error number: 1075; Symbol: ER_WRONG_AUTO_KEY; SQLSTATE: 42000

    Message: Incorrect table definition; there can be only one auto column and it must be defined as a key

  • Error number: 1076; Symbol: ER_READY; SQLSTATE: HY000

    Message: %s: ready for connections. Version: '%s' socket: '%s' port: %d

  • Error number: 1077; Symbol: ER_NORMAL_SHUTDOWN; SQLSTATE: HY000

    Message: %s: Normal shutdown

  • Error number: 1078; Symbol: ER_GOT_SIGNAL; SQLSTATE: HY000

    Message: %s: Got signal %d. Aborting!

  • Error number: 1079; Symbol: ER_SHUTDOWN_COMPLETE; SQLSTATE: HY000

    Message: %s: Shutdown complete

  • Error number: 1080; Symbol: ER_FORCING_CLOSE; SQLSTATE: 08S01

    Message: %s: Forcing close of thread %ld user: '%s'

  • Error number: 1081; Symbol: ER_IPSOCK_ERROR; SQLSTATE: 08S01

    Message: Can't create IP socket

  • Error number: 1082; Symbol: ER_NO_SUCH_INDEX; SQLSTATE: 42S12

    Message: Table '%s' has no index like the one used in CREATE INDEX; recreate the table

  • Error number: 1083; Symbol: ER_WRONG_FIELD_TERMINATORS; SQLSTATE: 42000

    Message: Field separator argument is not what is expected; check the manual

  • Error number: 1084; Symbol: ER_BLOBS_AND_NO_TERMINATED; SQLSTATE: 42000

    Message: You can't use fixed rowlength with BLOBs; please use 'fields terminated by'

  • Error number: 1085; Symbol: ER_TEXTFILE_NOT_READABLE; SQLSTATE: HY000

    Message: The file '%s' must be in the database directory or be readable by all

  • Error number: 1086; Symbol: ER_FILE_EXISTS_ERROR; SQLSTATE: HY000

    Message: File '%s' already exists

  • Error number: 1087; Symbol: ER_LOAD_INFO; SQLSTATE: HY000

    Message: Records: %ld Deleted: %ld Skipped: %ld Warnings: %ld

  • Error number: 1088; Symbol: ER_ALTER_INFO; SQLSTATE: HY000

    Message: Records: %ld Duplicates: %ld

  • Error number: 1089; Symbol: ER_WRONG_SUB_KEY; SQLSTATE: HY000

    Message: Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys

  • Error number: 1090; Symbol: ER_CANT_REMOVE_ALL_FIELDS; SQLSTATE: 42000

    Message: You can't delete all columns with ALTER TABLE; use DROP TABLE instead

  • Error number: 1091; Symbol: ER_CANT_DROP_FIELD_OR_KEY; SQLSTATE: 42000

    Message: Can't DROP '%s'; check that column/key exists

  • Error number: 1092; Symbol: ER_INSERT_INFO; SQLSTATE: HY000

    Message: Records: %ld Duplicates: %ld Warnings: %ld

  • Error number: 1093; Symbol: ER_UPDATE_TABLE_USED; SQLSTATE: HY000

    Message: You can't specify target table '%s' for update in FROM clause

    This error occurs for attempts to select from and modify the same table within a single statement. See Section 13.2.10.12, “Restrictions on Subqueries”.

  • Error number: 1094; Symbol: ER_NO_SUCH_THREAD; SQLSTATE: HY000

    Message: Unknown thread id: %lu

  • Error number: 1095; Symbol: ER_KILL_DENIED_ERROR; SQLSTATE: HY000

    Message: You are not owner of thread %lu

  • Error number: 1096; Symbol: ER_NO_TABLES_USED; SQLSTATE: HY000

    Message: No tables used

  • Error number: 1097; Symbol: ER_TOO_BIG_SET; SQLSTATE: HY000

    Message: Too many strings for column %s and SET

  • Error number: 1098; Symbol: ER_NO_UNIQUE_LOGFILE; SQLSTATE: HY000

    Message: Can't generate a unique log-filename %s.(1-999)

  • Error number: 1099; Symbol: ER_TABLE_NOT_LOCKED_FOR_WRITE; SQLSTATE: HY000

    Message: Table '%s' was locked with a READ lock and can't be updated

  • Error number: 1100; Symbol: ER_TABLE_NOT_LOCKED; SQLSTATE: HY000

    Message: Table '%s' was not locked with LOCK TABLES

  • Error number: 1101; Symbol: ER_BLOB_CANT_HAVE_DEFAULT; SQLSTATE: 42000

    Message: BLOB/TEXT column '%s' can't have a default value

  • Error number: 1102; Symbol: ER_WRONG_DB_NAME; SQLSTATE: 42000

    Message: Incorrect database name '%s'

  • Error number: 1103; Symbol: ER_WRONG_TABLE_NAME; SQLSTATE: 42000

    Message: Incorrect table name '%s'

  • Error number: 1104; Symbol: ER_TOO_BIG_SELECT; SQLSTATE: 42000

    Message: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay

  • Error number: 1105; Symbol: ER_UNKNOWN_ERROR; SQLSTATE: HY000

    Message: Unknown error

  • Error number: 1106; Symbol: ER_UNKNOWN_PROCEDURE; SQLSTATE: 42000

    Message: Unknown procedure '%s'

  • Error number: 1107; Symbol: ER_WRONG_PARAMCOUNT_TO_PROCEDURE; SQLSTATE: 42000

    Message: Incorrect parameter count to procedure '%s'

  • Error number: 1108; Symbol: ER_WRONG_PARAMETERS_TO_PROCEDURE; SQLSTATE: HY000

    Message: Incorrect parameters to procedure '%s'

  • Error number: 1109; Symbol: ER_UNKNOWN_TABLE; SQLSTATE: 42S02

    Message: Unknown table '%s' in %s

  • Error number: 1110; Symbol: ER_FIELD_SPECIFIED_TWICE; SQLSTATE: 42000

    Message: Column '%s' specified twice

  • Error number: 1111; Symbol: ER_INVALID_GROUP_FUNC_USE; SQLSTATE: HY000

    Message: Invalid use of group function

  • Error number: 1112; Symbol: ER_UNSUPPORTED_EXTENSION; SQLSTATE: 42000

    Message: Table '%s' uses an extension that doesn't exist in this MySQL version

  • Error number: 1113; Symbol: ER_TABLE_MUST_HAVE_COLUMNS; SQLSTATE: 42000

    Message: A table must have at least 1 column

  • Error number: 1114; Symbol: ER_RECORD_FILE_FULL; SQLSTATE: HY000

    Message: The table '%s' is full

    InnoDB reports this error when the system tablespace runs out of free space. Reconfigure the system tablespace to add a new data file.

  • Error number: 1115; Symbol: ER_UNKNOWN_CHARACTER_SET; SQLSTATE: 42000

    Message: Unknown character set: '%s'

  • Error number: 1116; Symbol: ER_TOO_MANY_TABLES; SQLSTATE: HY000

    Message: Too many tables; MySQL can only use %d tables in a join

  • Error number: 1117; Symbol: ER_TOO_MANY_FIELDS; SQLSTATE: HY000

    Message: Too many columns

  • Error number: 1118; Symbol: ER_TOO_BIG_ROWSIZE; SQLSTATE: 42000

    Message: Row size too large. The maximum row size for the used table type, not counting BLOBs, is %ld. You have to change some columns to TEXT or BLOBs

  • Error number: 1119; Symbol: ER_STACK_OVERRUN; SQLSTATE: HY000

    Message: Thread stack overrun: Used: %ld of a %ld stack. Use 'mysqld --thread_stack=#' to specify a bigger stack if needed

  • Error number: 1120; Symbol: ER_WRONG_OUTER_JOIN; SQLSTATE: 42000

    Message: Cross dependency found in OUTER JOIN; examine your ON conditions

  • Error number: 1121; Symbol: ER_NULL_COLUMN_IN_INDEX; SQLSTATE: 42000

    Message: Table handler doesn't support NULL in given index. Please change column '%s' to be NOT NULL or use another handler

  • Error number: 1122; Symbol: ER_CANT_FIND_UDF; SQLSTATE: HY000

    Message: Can't load function '%s'

  • Error number: 1123; Symbol: ER_CANT_INITIALIZE_UDF; SQLSTATE: HY000

    Message: Can't initialize function '%s'; %s

  • Error number: 1124; Symbol: ER_UDF_NO_PATHS; SQLSTATE: HY000

    Message: No paths allowed for shared library

  • Error number: 1125; Symbol: ER_UDF_EXISTS; SQLSTATE: HY000

    Message: Function '%s' already exists

  • Error number: 1126; Symbol: ER_CANT_OPEN_LIBRARY; SQLSTATE: HY000

    Message: Can't open shared library '%s' (errno: %d %s)

  • Error number: 1127; Symbol: ER_CANT_FIND_DL_ENTRY; SQLSTATE: HY000

    Message: Can't find symbol '%s' in library

  • Error number: 1128; Symbol: ER_FUNCTION_NOT_DEFINED; SQLSTATE: HY000

    Message: Function '%s' is not defined

  • Error number: 1129; Symbol: ER_HOST_IS_BLOCKED; SQLSTATE: HY000

    Message: Host '%s' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

  • Error number: 1130; Symbol: ER_HOST_NOT_PRIVILEGED; SQLSTATE: HY000

    Message: Host '%s' is not allowed to connect to this MySQL server

  • Error number: 1131; Symbol: ER_PASSWORD_ANONYMOUS_USER; SQLSTATE: 42000

    Message: You are using MySQL as an anonymous user and anonymous users are not allowed to change passwords

  • Error number: 1132; Symbol: ER_PASSWORD_NOT_ALLOWED; SQLSTATE: 42000

    Message: You must have privileges to update tables in the mysql database to be able to change passwords for others

  • Error number: 1133; Symbol: ER_PASSWORD_NO_MATCH; SQLSTATE: 42000

    Message: Can't find any matching row in the user table

  • Error number: 1134; Symbol: ER_UPDATE_INFO; SQLSTATE: HY000

    Message: Rows matched: %ld Changed: %ld Warnings: %ld

  • Error number: 1135; Symbol: ER_CANT_CREATE_THREAD; SQLSTATE: HY000

    Message: Can't create a new thread (errno %d); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug

  • Error number: 1136; Symbol: ER_WRONG_VALUE_COUNT_ON_ROW; SQLSTATE: 21S01

    Message: Column count doesn't match value count at row %ld

  • Error number: 1137; Symbol: ER_CANT_REOPEN_TABLE; SQLSTATE: HY000

    Message: Can't reopen table: '%s'

  • Error number: 1138; Symbol: ER_INVALID_USE_OF_NULL; SQLSTATE: 22004

    Message: Invalid use of NULL value

  • Error number: 1139; Symbol: ER_REGEXP_ERROR; SQLSTATE: 42000

    Message: Got error '%s' from regexp

  • Error number: 1140; Symbol: ER_MIX_OF_GROUP_FUNC_AND_FIELDS; SQLSTATE: 42000

    Message: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause

  • Error number: 1141; Symbol: ER_NONEXISTING_GRANT; SQLSTATE: 42000

    Message: There is no such grant defined for user '%s' on host '%s'

  • Error number: 1142; Symbol: ER_TABLEACCESS_DENIED_ERROR; SQLSTATE: 42000

    Message: %s command denied to user '%s'@'%s' for table '%s'

  • Error number: 1143; Symbol: ER_COLUMNACCESS_DENIED_ERROR; SQLSTATE: 42000

    Message: %s command denied to user '%s'@'%s' for column '%s' in table '%s'

  • Error number: 1144; Symbol: ER_ILLEGAL_GRANT_FOR_TABLE; SQLSTATE: 42000

    Message: Illegal GRANT/REVOKE command; please consult the manual to see which privileges can be used

  • Error number: 1145; Symbol: ER_GRANT_WRONG_HOST_OR_USER; SQLSTATE: 42000

    Message: The host or user argument to GRANT is too long

  • Error number: 1146; Symbol: ER_NO_SUCH_TABLE; SQLSTATE: 42S02

    Message: Table '%s.%s' doesn't exist

  • Error number: 1147; Symbol: ER_NONEXISTING_TABLE_GRANT; SQLSTATE: 42000

    Message: There is no such grant defined for user '%s' on host '%s' on table '%s'

  • Error number: 1148; Symbol: ER_NOT_ALLOWED_COMMAND; SQLSTATE: 42000

    Message: The used command is not allowed with this MySQL version

  • Error number: 1149; Symbol: ER_SYNTAX_ERROR; SQLSTATE: 42000

    Message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use

  • Error number: 1150; Symbol: ER_DELAYED_CANT_CHANGE_LOCK; SQLSTATE: HY000

    Message: Delayed insert thread couldn't get requested lock for table %s

  • Error number: 1151; Symbol: ER_TOO_MANY_DELAYED_THREADS; SQLSTATE: HY000

    Message: Too many delayed threads in use

  • Error number: 1152; Symbol: ER_ABORTING_CONNECTION; SQLSTATE: 08S01

    Message: Aborted connection %ld to db: '%s' user: '%s' (%s)

  • Error number: 1153; Symbol: ER_NET_PACKET_TOO_LARGE; SQLSTATE: 08S01

    Message: Got a packet bigger than 'max_allowed_packet' bytes

  • Error number: 1154; Symbol: ER_NET_READ_ERROR_FROM_PIPE; SQLSTATE: 08S01

    Message: Got a read error from the connection pipe

  • Error number: 1155; Symbol: ER_NET_FCNTL_ERROR; SQLSTATE: 08S01

    Message: Got an error from fcntl()

  • Error number: 1156; Symbol: ER_NET_PACKETS_OUT_OF_ORDER; SQLSTATE: 08S01

    Message: Got packets out of order

  • Error number: 1157; Symbol: ER_NET_UNCOMPRESS_ERROR; SQLSTATE: 08S01

    Message: Couldn't uncompress communication packet

  • Error number: 1158; Symbol: ER_NET_READ_ERROR; SQLSTATE: 08S01

    Message: Got an error reading communication packets

  • Error number: 1159; Symbol: ER_NET_READ_INTERRUPTED; SQLSTATE: 08S01

    Message: Got timeout reading communication packets

  • Error number: 1160; Symbol: ER_NET_ERROR_ON_WRITE; SQLSTATE: 08S01

    Message: Got an error writing communication packets

  • Error number: 1161; Symbol: ER_NET_WRITE_INTERRUPTED; SQLSTATE: 08S01

    Message: Got timeout writing communication packets

  • Error number: 1162; Symbol: ER_TOO_LONG_STRING; SQLSTATE: 42000

    Message: Result string is longer than 'max_allowed_packet' bytes

  • Error number: 1163; Symbol: ER_TABLE_CANT_HANDLE_BLOB; SQLSTATE: 42000

    Message: The used table type doesn't support BLOB/TEXT columns

  • Error number: 1164; Symbol: ER_TABLE_CANT_HANDLE_AUTO_INCREMENT; SQLSTATE: 42000

    Message: The used table type doesn't support AUTO_INCREMENT columns

  • Error number: 1165; Symbol: ER_DELAYED_INSERT_TABLE_LOCKED; SQLSTATE: HY000

    Message: INSERT DELAYED can't be used with table '%s' because it is locked with LOCK TABLES

  • Error number: 1166; Symbol: ER_WRONG_COLUMN_NAME; SQLSTATE: 42000

    Message: Incorrect column name '%s'

  • Error number: 1167; Symbol: ER_WRONG_KEY_COLUMN; SQLSTATE: 42000

    Message: The used storage engine can't index column '%s'

  • Error number: 1168; Symbol: ER_WRONG_MRG_TABLE; SQLSTATE: HY000

    Message: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist

  • Error number: 1169; Symbol: ER_DUP_UNIQUE; SQLSTATE: 23000

    Message: Can't write, because of unique constraint, to table '%s'

  • Error number: 1170; Symbol: ER_BLOB_KEY_WITHOUT_LENGTH; SQLSTATE: 42000

    Message: BLOB/TEXT column '%s' used in key specification without a key length

  • Error number: 1171; Symbol: ER_PRIMARY_CANT_HAVE_NULL; SQLSTATE: 42000

    Message: All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead

  • Error number: 1172; Symbol: ER_TOO_MANY_ROWS; SQLSTATE: 42000

    Message: Result consisted of more than one row

  • Error number: 1173; Symbol: ER_REQUIRES_PRIMARY_KEY; SQLSTATE: 42000

    Message: This table type requires a primary key

    InnoDB reports this error when you attempt to drop an implicit clustered index (the first UNIQUE NOT NULL index) if the table did not contain a PRIMARY KEY.

    InnoDB should no longer report this error as of MySQL 5.5. For tables without an explicit PRIMARY KEY, InnoDB creates an implicit clustered index using the first columns of the table that are declared UNIQUE and NOT NULL. When you drop such an index, InnoDB now automatically copies the table and rebuilds the index using a different UNIQUE NOT NULL group of columns or a system-generated key. Since this operation changes the primary key, it uses the slow method of copying the table and re-creating the index, rather than the Fast Index Creation technique from Section 14.16.3, “Implementation Details of Fast Index Creation”.

  • Error number: 1174; Symbol: ER_NO_RAID_COMPILED; SQLSTATE: HY000

    Message: This version of MySQL is not compiled with RAID support

  • Error number: 1175; Symbol: ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE; SQLSTATE: HY000

    Message: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column

  • Error number: 1176; Symbol: ER_KEY_DOES_NOT_EXITS; SQLSTATE: 42000

    Message: Key '%s' doesn't exist in table '%s'

  • Error number: 1177; Symbol: ER_CHECK_NO_SUCH_TABLE; SQLSTATE: 42000

    Message: Can't open table

  • Error number: 1178; Symbol: ER_CHECK_NOT_IMPLEMENTED; SQLSTATE: 42000

    Message: The storage engine for the table doesn't support %s

  • Error number: 1179; Symbol: ER_CANT_DO_THIS_DURING_AN_TRANSACTION; SQLSTATE: 25000

    Message: You are not allowed to execute this command in a transaction

  • Error number: 1180; Symbol: ER_ERROR_DURING_COMMIT; SQLSTATE: HY000

    Message: Got error %d during COMMIT

  • Error number: 1181; Symbol: ER_ERROR_DURING_ROLLBACK; SQLSTATE: HY000

    Message: Got error %d during ROLLBACK

  • Error number: 1182; Symbol: ER_ERROR_DURING_FLUSH_LOGS; SQLSTATE: HY000

    Message: Got error %d during FLUSH_LOGS

  • Error number: 1183; Symbol: ER_ERROR_DURING_CHECKPOINT; SQLSTATE: HY000

    Message: Got error %d during CHECKPOINT

  • Error number: 1184; Symbol: ER_NEW_ABORTING_CONNECTION; SQLSTATE: 08S01

    Message: Aborted connection %ld to db: '%s' user: '%s' host: '%s' (%s)

  • Error number: 1185; Symbol: ER_DUMP_NOT_IMPLEMENTED; SQLSTATE: HY000

    Message: The storage engine for the table does not support binary table dump

  • Error number: 1186; Symbol: ER_FLUSH_MASTER_BINLOG_CLOSED; SQLSTATE: HY000

    Message: Binlog closed, cannot RESET MASTER

  • Error number: 1187; Symbol: ER_INDEX_REBUILD; SQLSTATE: HY000

    Message: Failed rebuilding the index of dumped table '%s'

  • Error number: 1188; Symbol: ER_MASTER; SQLSTATE: HY000

    Message: Error from master: '%s'

  • Error number: 1189; Symbol: ER_MASTER_NET_READ; SQLSTATE: 08S01

    Message: Net error reading from master

  • Error number: 1190; Symbol: ER_MASTER_NET_WRITE; SQLSTATE: 08S01

    Message: Net error writing to master

  • Error number: 1191; Symbol: ER_FT_MATCHING_KEY_NOT_FOUND; SQLSTATE: HY000

    Message: Can't find FULLTEXT index matching the column list

  • Error number: 1192; Symbol: ER_LOCK_OR_ACTIVE_TRANSACTION; SQLSTATE: HY000

    Message: Can't execute the given command because you have active locked tables or an active transaction

  • Error number: 1193; Symbol: ER_UNKNOWN_SYSTEM_VARIABLE; SQLSTATE: HY000

    Message: Unknown system variable '%s'

  • Error number: 1194; Symbol: ER_CRASHED_ON_USAGE; SQLSTATE: HY000

    Message: Table '%s' is marked as crashed and should be repaired

  • Error number: 1195; Symbol: ER_CRASHED_ON_REPAIR; SQLSTATE: HY000

    Message: Table '%s' is marked as crashed and last (automatic?) repair failed

  • Error number: 1196; Symbol: ER_WARNING_NOT_COMPLETE_ROLLBACK; SQLSTATE: HY000

    Message: Some non-transactional changed tables couldn't be rolled back

  • Error number: 1197; Symbol: ER_TRANS_CACHE_FULL; SQLSTATE: HY000

    Message: Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again

  • Error number: 1198; Symbol: ER_SLAVE_MUST_STOP; SQLSTATE: HY000

    Message: This operation cannot be performed with a running slave; run STOP SLAVE first

  • Error number: 1199; Symbol: ER_SLAVE_NOT_RUNNING; SQLSTATE: HY000

    Message: This operation requires a running slave; configure slave and do START SLAVE

  • Error number: 1200; Symbol: ER_BAD_SLAVE; SQLSTATE: HY000

    Message: The server is not configured as slave; fix in config file or with CHANGE MASTER TO

  • Error number: 1201; Symbol: ER_MASTER_INFO; SQLSTATE: HY000

    Message: Could not initialize master info structure; more error messages can be found in the MySQL error log

  • Error number: 1202; Symbol: ER_SLAVE_THREAD; SQLSTATE: HY000

    Message: Could not create slave thread; check system resources

  • Error number: 1203; Symbol: ER_TOO_MANY_USER_CONNECTIONS; SQLSTATE: 42000

    Message: User %s already has more than 'max_user_connections' active connections

  • Error number: 1204; Symbol: ER_SET_CONSTANTS_ONLY; SQLSTATE: HY000

    Message: You may only use constant expressions with SET

  • Error number: 1205; Symbol: ER_LOCK_WAIT_TIMEOUT; SQLSTATE: HY000

    Message: Lock wait timeout exceeded; try restarting transaction

    InnoDB reports this error when lock wait timeout expires. The statement that waited too long was rolled back (not the entire transaction). You can increase the value of the innodb_lock_wait_timeout configuration option if SQL statements should wait longer for other transactions to complete, or decrease it if too many long-running transactions are causing locking problems and reducing concurrency on a busy system.

  • Error number: 1206; Symbol: ER_LOCK_TABLE_FULL; SQLSTATE: HY000

    Message: The total number of locks exceeds the lock table size

    InnoDB reports this error when the total number of locks exceeds the amount of memory devoted to managing locks. To avoid this error, increase the value of innodb_buffer_pool_size. Within an individual application, a workaround may be to break a large operation into smaller pieces. For example, if the error occurs for a large INSERT, perform several smaller INSERT operations.

  • Error number: 1207; Symbol: ER_READ_ONLY_TRANSACTION; SQLSTATE: 25000

    Message: Update locks cannot be acquired during a READ UNCOMMITTED transaction

  • Error number: 1208; Symbol: ER_DROP_DB_WITH_READ_LOCK; SQLSTATE: HY000

    Message: DROP DATABASE not allowed while thread is holding global read lock

  • Error number: 1209; Symbol: ER_CREATE_DB_WITH_READ_LOCK; SQLSTATE: HY000

    Message: CREATE DATABASE not allowed while thread is holding global read lock

  • Error number: 1210; Symbol: ER_WRONG_ARGUMENTS; SQLSTATE: HY000

    Message: Incorrect arguments to %s

  • Error number: 1211; Symbol: ER_NO_PERMISSION_TO_CREATE_USER; SQLSTATE: 42000

    Message: '%s'@'%s' is not allowed to create new users

  • Error number: 1212; Symbol: ER_UNION_TABLES_IN_DIFFERENT_DIR; SQLSTATE: HY000

    Message: Incorrect table definition; all MERGE tables must be in the same database

  • Error number: 1213; Symbol: ER_LOCK_DEADLOCK; SQLSTATE: 40001

    Message: Deadlock found when trying to get lock; try restarting transaction

    InnoDB reports this error when a transaction encounters a deadlock and is automatically rolled back so that your application can take corrective action. To recover from this error, run all the operations in this transaction again. A deadlock occurs when requests for locks arrive in inconsistent order between transactions. The transaction that was rolled back released all its locks, and the other transaction can now get all the locks it requested. Thus, when you re-run the transaction that was rolled back, it might have to wait for other transactions to complete, but typically the deadlock does not recur. If you encounter frequent deadlocks, make the sequence of locking operations (LOCK TABLES, SELECT ... FOR UPDATE, and so on) consistent between the different transactions or applications that experience the issue. See Section 14.10.5, “Deadlocks in InnoDB” for details.

  • Error number: 1214; Symbol: ER_TABLE_CANT_HANDLE_FT; SQLSTATE: HY000

    Message: The used table type doesn't support FULLTEXT indexes

  • Error number: 1215; Symbol: ER_CANNOT_ADD_FOREIGN; SQLSTATE: HY000

    Message: Cannot add foreign key constraint

  • Error number: 1216; Symbol: ER_NO_REFERENCED_ROW; SQLSTATE: 23000

    Message: Cannot add or update a child row: a foreign key constraint fails

    InnoDB reports this error when you try to add a row but there is no parent row, and a foreign key constraint fails. Add the parent row first.

  • Error number: 1217; Symbol: ER_ROW_IS_REFERENCED; SQLSTATE: 23000

    Message: Cannot delete or update a parent row: a foreign key constraint fails

    InnoDB reports this error when you try to delete a parent row that has children, and a foreign key constraint fails. Delete the children first.

  • Error number: 1218; Symbol: ER_CONNECT_TO_MASTER; SQLSTATE: 08S01

    Message: Error connecting to master: %s

  • Error number: 1219; Symbol: ER_QUERY_ON_MASTER; SQLSTATE: HY000

    Message: Error running query on master: %s

  • Error number: 1220; Symbol: ER_ERROR_WHEN_EXECUTING_COMMAND; SQLSTATE: HY000

    Message: Error when executing command %s: %s

  • Error number: 1221; Symbol: ER_WRONG_USAGE; SQLSTATE: HY000

    Message: Incorrect usage of %s and %s

  • Error number: 1222; Symbol: ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT; SQLSTATE: 21000

    Message: The used SELECT statements have a different number of columns

  • Error number: 1223; Symbol: ER_CANT_UPDATE_WITH_READLOCK; SQLSTATE: HY000

    Message: Can't execute the query because you have a conflicting read lock

  • Error number: 1224; Symbol: ER_MIXING_NOT_ALLOWED; SQLSTATE: HY000

    Message: Mixing of transactional and non-transactional tables is disabled

  • Error number: 1225; Symbol: ER_DUP_ARGUMENT; SQLSTATE: HY000

    Message: Option '%s' used twice in statement

  • Error number: 1226; Symbol: ER_USER_LIMIT_REACHED; SQLSTATE: 42000

    Message: User '%s' has exceeded the '%s' resource (current value: %ld)

  • Error number: 1227; Symbol: ER_SPECIFIC_ACCESS_DENIED_ERROR; SQLSTATE: 42000

    Message: Access denied; you need (at least one of) the %s privilege(s) for this operation

  • Error number: 1228; Symbol: ER_LOCAL_VARIABLE; SQLSTATE: HY000

    Message: Variable '%s' is a SESSION variable and can't be used with SET GLOBAL

  • Error number: 1229; Symbol: ER_GLOBAL_VARIABLE; SQLSTATE: HY000

    Message: Variable '%s' is a GLOBAL variable and should be set with SET GLOBAL

  • Error number: 1230; Symbol: ER_NO_DEFAULT; SQLSTATE: 42000

    Message: Variable '%s' doesn't have a default value

  • Error number: 1231; Symbol: ER_WRONG_VALUE_FOR_VAR; SQLSTATE: 42000

    Message: Variable '%s' can't be set to the value of '%s'

  • Error number: 1232; Symbol: ER_WRONG_TYPE_FOR_VAR; SQLSTATE: 42000

    Message: Incorrect argument type to variable '%s'

  • Error number: 1233; Symbol: ER_VAR_CANT_BE_READ; SQLSTATE: HY000

    Message: Variable '%s' can only be set, not read

  • Error number: 1234; Symbol: ER_CANT_USE_OPTION_HERE; SQLSTATE: 42000

    Message: Incorrect usage/placement of '%s'

  • Error number: 1235; Symbol: ER_NOT_SUPPORTED_YET; SQLSTATE: 42000

    Message: This version of MySQL doesn't yet support '%s'

  • Error number: 1236; Symbol: ER_MASTER_FATAL_ERROR_READING_BINLOG; SQLSTATE: HY000

    Message: Got fatal error %d from master when reading data from binary log: '%s'

  • Error number: 1237; Symbol: ER_SLAVE_IGNORED_TABLE; SQLSTATE: HY000

    Message: Slave SQL thread ignored the query because of replicate-*-table rules

  • Error number: 1238; Symbol: ER_INCORRECT_GLOBAL_LOCAL_VAR; SQLSTATE: HY000

    Message: Variable '%s' is a %s variable

  • Error number: 1239; Symbol: ER_WRONG_FK_DEF; SQLSTATE: 42000

    Message: Incorrect foreign key definition for '%s': %s

  • Error number: 1240; Symbol: ER_KEY_REF_DO_NOT_MATCH_TABLE_REF; SQLSTATE: HY000

    Message: Key reference and table reference don't match

  • Error number: 1241; Symbol: ER_OPERAND_COLUMNS; SQLSTATE: 21000

    Message: Operand should contain %d column(s)

  • Error number: 1242; Symbol: ER_SUBQUERY_NO_1_ROW; SQLSTATE: 21000

    Message: Subquery returns more than 1 row

  • Error number: 1243; Symbol: ER_UNKNOWN_STMT_HANDLER; SQLSTATE: HY000

    Message: Unknown prepared statement handler (%.*s) given to %s

  • Error number: 1244; Symbol: ER_CORRUPT_HELP_DB; SQLSTATE: HY000

    Message: Help database is corrupt or does not exist

  • Error number: 1245; Symbol: ER_CYCLIC_REFERENCE; SQLSTATE: HY000

    Message: Cyclic reference on subqueries

  • Error number: 1246; Symbol: ER_AUTO_CONVERT; SQLSTATE: HY000

    Message: Converting column '%s' from %s to %s

  • Error number: 1247; Symbol: ER_ILLEGAL_REFERENCE; SQLSTATE: 42S22

    Message: Reference '%s' not supported (%s)

  • Error number: 1248; Symbol: ER_DERIVED_MUST_HAVE_ALIAS; SQLSTATE: 42000

    Message: Every derived table must have its own alias

  • Error number: 1249; Symbol: ER_SELECT_REDUCED; SQLSTATE: 01000

    Message: Select %u was reduced during optimization

  • Error number: 1250; Symbol: ER_TABLENAME_NOT_ALLOWED_HERE; SQLSTATE: 42000

    Message: Table '%s' from one of the SELECTs cannot be used in %s

  • Error number: 1251; Symbol: ER_NOT_SUPPORTED_AUTH_MODE; SQLSTATE: 08004

    Message: Client does not support authentication protocol requested by server; consider upgrading MySQL client

  • Error number: 1252; Symbol: ER_SPATIAL_CANT_HAVE_NULL; SQLSTATE: 42000

    Message: All parts of a SPATIAL index must be NOT NULL

  • Error number: 1253; Symbol: ER_COLLATION_CHARSET_MISMATCH; SQLSTATE: 42000

    Message: COLLATION '%s' is not valid for CHARACTER SET '%s'

  • Error number: 1254; Symbol: ER_SLAVE_WAS_RUNNING; SQLSTATE: HY000

    Message: Slave is already running

  • Error number: 1255; Symbol: ER_SLAVE_WAS_NOT_RUNNING; SQLSTATE: HY000

    Message: Slave already has been stopped

  • Error number: 1256; Symbol: ER_TOO_BIG_FOR_UNCOMPRESS; SQLSTATE: HY000

    Message: Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)

  • Error number: 1257; Symbol: ER_ZLIB_Z_MEM_ERROR; SQLSTATE: HY000

    Message: ZLIB: Not enough memory

  • Error number: 1258; Symbol: ER_ZLIB_Z_BUF_ERROR; SQLSTATE: HY000

    Message: ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)

  • Error number: 1259; Symbol: ER_ZLIB_Z_DATA_ERROR; SQLSTATE: HY000

    Message: ZLIB: Input data corrupted

  • Error number: 1260; Symbol: ER_CUT_VALUE_GROUP_CONCAT; SQLSTATE: HY000

    Message: Row %u was cut by GROUP_CONCAT()

  • Error number: 1261; Symbol: ER_WARN_TOO_FEW_RECORDS; SQLSTATE: 01000

    Message: Row %ld doesn't contain data for all columns

  • Error number: 1262; Symbol: ER_WARN_TOO_MANY_RECORDS; SQLSTATE: 01000

    Message: Row %ld was truncated; it contained more data than there were input columns

  • Error number: 1263; Symbol: ER_WARN_NULL_TO_NOTNULL; SQLSTATE: 22004

    Message: Column set to default value; NULL supplied to NOT NULL column '%s' at row %ld

  • Error number: 1264; Symbol: ER_WARN_DATA_OUT_OF_RANGE; SQLSTATE: 22003

    Message: Out of range value for column '%s' at row %ld

  • Error number: 1265; Symbol: WARN_DATA_TRUNCATED; SQLSTATE: 01000

    Message: Data truncated for column '%s' at row %ld

  • Error number: 1266; Symbol: ER_WARN_USING_OTHER_HANDLER; SQLSTATE: HY000

    Message: Using storage engine %s for table '%s'

  • Error number: 1267; Symbol: ER_CANT_AGGREGATE_2COLLATIONS; SQLSTATE: HY000

    Message: Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'

  • Error number: 1268; Symbol: ER_DROP_USER; SQLSTATE: HY000

    Message: Cannot drop one or more of the requested users

  • Error number: 1269; Symbol: ER_REVOKE_GRANTS; SQLSTATE: HY000

    Message: Can't revoke all privileges for one or more of the requested users

  • Error number: 1270; Symbol: ER_CANT_AGGREGATE_3COLLATIONS; SQLSTATE: HY000

    Message: Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'

  • Error number: 1271; Symbol: ER_CANT_AGGREGATE_NCOLLATIONS; SQLSTATE: HY000

    Message: Illegal mix of collations for operation '%s'

  • Error number: 1272; Symbol: ER_VARIABLE_IS_NOT_STRUCT; SQLSTATE: HY000

    Message: Variable '%s' is not a variable component (can't be used as XXXX.variable_name)

  • Error number: 1273; Symbol: ER_UNKNOWN_COLLATION; SQLSTATE: HY000

    Message: Unknown collation: '%s'

  • Error number: 1274; Symbol: ER_SLAVE_IGNORED_SSL_PARAMS; SQLSTATE: HY000

    Message: SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started

  • Error number: 1275; Symbol: ER_SERVER_IS_IN_SECURE_AUTH_MODE; SQLSTATE: HY000

    Message: Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format

  • Error number: 1276; Symbol: ER_WARN_FIELD_RESOLVED; SQLSTATE: HY000

    Message: Field or reference '%s%s%s%s%s' of SELECT #%d was resolved in SELECT #%d

  • Error number: 1277; Symbol: ER_BAD_SLAVE_UNTIL_COND; SQLSTATE: HY000

    Message: Incorrect parameter or combination of parameters for START SLAVE UNTIL

  • Error number: 1278; Symbol: ER_MISSING_SKIP_SLAVE; SQLSTATE: HY000

    Message: It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart

  • Error number: 1279; Symbol: ER_UNTIL_COND_IGNORED; SQLSTATE: HY000

    Message: SQL thread is not to be started so UNTIL options are ignored

  • Error number: 1280; Symbol: ER_WRONG_NAME_FOR_INDEX; SQLSTATE: 42000

    Message: Incorrect index name '%s'

  • Error number: 1281; Symbol: ER_WRONG_NAME_FOR_CATALOG; SQLSTATE: 42000

    Message: Incorrect catalog name '%s'

  • Error number: 1282; Symbol: ER_WARN_QC_RESIZE; SQLSTATE: HY000

    Message: Query cache failed to set size %lu; new query cache size is %lu

  • Error number: 1283; Symbol: ER_BAD_FT_COLUMN; SQLSTATE: HY000

    Message: Column '%s' cannot be part of FULLTEXT index

  • Error number: 1284; Symbol: ER_UNKNOWN_KEY_CACHE; SQLSTATE: HY000

    Message: Unknown key cache '%s'

  • Error number: 1285; Symbol: ER_WARN_HOSTNAME_WONT_WORK; SQLSTATE: HY000

    Message: MySQL is started in --skip-name-resolve mode; you must restart it without this switch for this grant to work

  • Error number: 1286; Symbol: ER_UNKNOWN_STORAGE_ENGINE; SQLSTATE: 42000

    Message: Unknown storage engine '%s'

  • Error number: 1287; Symbol: ER_WARN_DEPRECATED_SYNTAX; SQLSTATE: HY000

    Message: '%s' is deprecated and will be removed in a future release. Please use %s instead

  • Error number: 1288; Symbol: ER_NON_UPDATABLE_TABLE; SQLSTATE: HY000

    Message: The target table %s of the %s is not updatable

  • Error number: 1289; Symbol: ER_FEATURE_DISABLED; SQLSTATE: HY000

    Message: The '%s' feature is disabled; you need MySQL built with '%s' to have it working

  • Error number: 1290; Symbol: ER_OPTION_PREVENTS_STATEMENT; SQLSTATE: HY000

    Message: The MySQL server is running with the %s option so it cannot execute this statement

  • Error number: 1291; Symbol: ER_DUPLICATED_VALUE_IN_TYPE; SQLSTATE: HY000

    Message: Column '%s' has duplicated value '%s' in %s

  • Error number: 1292; Symbol: ER_TRUNCATED_WRONG_VALUE; SQLSTATE: 22007

    Message: Truncated incorrect %s value: '%s'

  • Error number: 1293; Symbol: ER_TOO_MUCH_AUTO_TIMESTAMP_COLS; SQLSTATE: HY000

    Message: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

  • Error number: 1294; Symbol: ER_INVALID_ON_UPDATE; SQLSTATE: HY000

    Message: Invalid ON UPDATE clause for '%s' column

  • Error number: 1295; Symbol: ER_UNSUPPORTED_PS; SQLSTATE: HY000

    Message: This command is not supported in the prepared statement protocol yet

  • Error number: 1296; Symbol: ER_GET_ERRMSG; SQLSTATE: HY000

    Message: Got error %d '%s' from %s

  • Error number: 1297; Symbol: ER_GET_TEMPORARY_ERRMSG; SQLSTATE: HY000

    Message: Got temporary error %d '%s' from %s

  • Error number: 1298; Symbol: ER_UNKNOWN_TIME_ZONE; SQLSTATE: HY000

    Message: Unknown or incorrect time zone: '%s'

  • Error number: 1299; Symbol: ER_WARN_INVALID_TIMESTAMP; SQLSTATE: HY000

    Message: Invalid TIMESTAMP value in column '%s' at row %ld

  • Error number: 1300; Symbol: ER_INVALID_CHARACTER_STRING; SQLSTATE: HY000

    Message: Invalid %s character string: '%s'

  • Error number: 1301; Symbol: ER_WARN_ALLOWED_PACKET_OVERFLOWED; SQLSTATE: HY000

    Message: Result of %s() was larger than max_allowed_packet (%ld) - truncated

  • Error number: 1302; Symbol: ER_CONFLICTING_DECLARATIONS; SQLSTATE: HY000

    Message: Conflicting declarations: '%s%s' and '%s%s'

  • Error number: 1303; Symbol: ER_SP_NO_RECURSIVE_CREATE; SQLSTATE: 2F003

    Message: Can't create a %s from within another stored routine

  • Error number: 1304; Symbol: ER_SP_ALREADY_EXISTS; SQLSTATE: 42000

    Message: %s %s already exists

  • Error number: 1305; Symbol: ER_SP_DOES_NOT_EXIST; SQLSTATE: 42000

    Message: %s %s does not exist

  • Error number: 1306; Symbol: ER_SP_DROP_FAILED; SQLSTATE: HY000

    Message: Failed to DROP %s %s

  • Error number: 1307; Symbol: ER_SP_STORE_FAILED; SQLSTATE: HY000

    Message: Failed to CREATE %s %s

  • Error number: 1308; Symbol: ER_SP_LILABEL_MISMATCH; SQLSTATE: 42000

    Message: %s with no matching label: %s

  • Error number: 1309; Symbol: ER_SP_LABEL_REDEFINE; SQLSTATE: 42000

    Message: Redefining label %s

  • Error number: 1310; Symbol: ER_SP_LABEL_MISMATCH; SQLSTATE: 42000

    Message: End-label %s without match

  • Error number: 1311; Symbol: ER_SP_UNINIT_VAR; SQLSTATE: 01000

    Message: Referring to uninitialized variable %s

  • Error number: 1312; Symbol: ER_SP_BADSELECT; SQLSTATE: 0A000

    Message: PROCEDURE %s can't return a result set in the given context

  • Error number: 1313; Symbol: ER_SP_BADRETURN; SQLSTATE: 42000

    Message: RETURN is only allowed in a FUNCTION

  • Error number: 1314; Symbol: ER_SP_BADSTATEMENT; SQLSTATE: 0A000

    Message: %s is not allowed in stored procedures

  • Error number: 1315; Symbol: ER_UPDATE_LOG_DEPRECATED_IGNORED; SQLSTATE: 42000

    Message: The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been ignored. This option will be removed in MySQL 5.6.

  • Error number: 1316; Symbol: ER_UPDATE_LOG_DEPRECATED_TRANSLATED; SQLSTATE: 42000

    Message: The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been translated to SET SQL_LOG_BIN. This option will be removed in MySQL 5.6.

  • Error number: 1317; Symbol: ER_QUERY_INTERRUPTED; SQLSTATE: 70100

    Message: Query execution was interrupted

  • Error number: 1318; Symbol: ER_SP_WRONG_NO_OF_ARGS; SQLSTATE: 42000

    Message: Incorrect number of arguments for %s %s; expected %u, got %u

  • Error number: 1319; Symbol: ER_SP_COND_MISMATCH; SQLSTATE: 42000

    Message: Undefined CONDITION: %s

  • Error number: 1320; Symbol: ER_SP_NORETURN; SQLSTATE: 42000

    Message: No RETURN found in FUNCTION %s

  • Error number: 1321; Symbol: ER_SP_NORETURNEND; SQLSTATE: 2F005

    Message: FUNCTION %s ended without RETURN

  • Error number: 1322; Symbol: ER_SP_BAD_CURSOR_QUERY; SQLSTATE: 42000

    Message: Cursor statement must be a SELECT

  • Error number: 1323; Symbol: ER_SP_BAD_CURSOR_SELECT; SQLSTATE: 42000

    Message: Cursor SELECT must not have INTO

  • Error number: 1324; Symbol: ER_SP_CURSOR_MISMATCH; SQLSTATE: 42000

    Message: Undefined CURSOR: %s

  • Error number: 1325; Symbol: ER_SP_CURSOR_ALREADY_OPEN; SQLSTATE: 24000

    Message: Cursor is already open

  • Error number: 1326; Symbol: ER_SP_CURSOR_NOT_OPEN; SQLSTATE: 24000

    Message: Cursor is not open

  • Error number: 1327; Symbol: ER_SP_UNDECLARED_VAR; SQLSTATE: 42000

    Message: Undeclared variable: %s

  • Error number: 1328; Symbol: ER_SP_WRONG_NO_OF_FETCH_ARGS; SQLSTATE: HY000

    Message: Incorrect number of FETCH variables

  • Error number: 1329; Symbol: ER_SP_FETCH_NO_DATA; SQLSTATE: 02000

    Message: No data - zero rows fetched, selected, or processed

  • Error number: 1330; Symbol: ER_SP_DUP_PARAM; SQLSTATE: 42000

    Message: Duplicate parameter: %s

  • Error number: 1331; Symbol: ER_SP_DUP_VAR; SQLSTATE: 42000

    Message: Duplicate variable: %s

  • Error number: 1332; Symbol: ER_SP_DUP_COND; SQLSTATE: 42000

    Message: Duplicate condition: %s

  • Error number: 1333; Symbol: ER_SP_DUP_CURS; SQLSTATE: 42000

    Message: Duplicate cursor: %s

  • Error number: 1334; Symbol: ER_SP_CANT_ALTER; SQLSTATE: HY000

    Message: Failed to ALTER %s %s

  • Error number: 1335; Symbol: ER_SP_SUBSELECT_NYI; SQLSTATE: 0A000

    Message: Subquery value not supported

  • Error number: 1336; Symbol: ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG; SQLSTATE: 0A000

    Message: %s is not allowed in stored function or trigger

  • Error number: 1337; Symbol: ER_SP_VARCOND_AFTER_CURSHNDLR; SQLSTATE: 42000

    Message: Variable or condition declaration after cursor or handler declaration

  • Error number: 1338; Symbol: ER_SP_CURSOR_AFTER_HANDLER; SQLSTATE: 42000

    Message: Cursor declaration after handler declaration

  • Error number: 1339; Symbol: ER_SP_CASE_NOT_FOUND; SQLSTATE: 20000

    Message: Case not found for CASE statement

  • Error number: 1340; Symbol: ER_FPARSER_TOO_BIG_FILE; SQLSTATE: HY000

    Message: Configuration file '%s' is too big

  • Error number: 1341; Symbol: ER_FPARSER_BAD_HEADER; SQLSTATE: HY000

    Message: Malformed file type header in file '%s'

  • Error number: 1342; Symbol: ER_FPARSER_EOF_IN_COMMENT; SQLSTATE: HY000

    Message: Unexpected end of file while parsing comment '%s'

  • Error number: 1343; Symbol: ER_FPARSER_ERROR_IN_PARAMETER; SQLSTATE: HY000

    Message: Error while parsing parameter '%s' (line: '%s')

  • Error number: 1344; Symbol: ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER; SQLSTATE: HY000

    Message: Unexpected end of file while skipping unknown parameter '%s'

  • Error number: 1345; Symbol: ER_VIEW_NO_EXPLAIN; SQLSTATE: HY000

    Message: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table

  • Error number: 1346; Symbol: ER_FRM_UNKNOWN_TYPE; SQLSTATE: HY000

    Message: File '%s' has unknown type '%s' in its header

  • Error number: 1347; Symbol: ER_WRONG_OBJECT; SQLSTATE: HY000

    Message: '%s.%s' is not %s

    The named object is incorrect for the type of operation attempted on it. It must be an object of the named type.

  • Error number: 1348; Symbol: ER_NONUPDATEABLE_COLUMN; SQLSTATE: HY000

    Message: Column '%s' is not updatable

  • Error number: 1349; Symbol: ER_VIEW_SELECT_DERIVED; SQLSTATE: HY000

    Message: View's SELECT contains a subquery in the FROM clause

  • Error number: 1350; Symbol: ER_VIEW_SELECT_CLAUSE; SQLSTATE: HY000

    Message: View's SELECT contains a '%s' clause

  • Error number: 1351; Symbol: ER_VIEW_SELECT_VARIABLE; SQLSTATE: HY000

    Message: View's SELECT contains a variable or parameter

  • Error number: 1352; Symbol: ER_VIEW_SELECT_TMPTABLE; SQLSTATE: HY000

    Message: View's SELECT refers to a temporary table '%s'

  • Error number: 1353; Symbol: ER_VIEW_WRONG_LIST; SQLSTATE: HY000

    Message: View's SELECT and view's field list have different column counts

  • Error number: 1354; Symbol: ER_WARN_VIEW_MERGE; SQLSTATE: HY000

    Message: View merge algorithm can't be used here for now (assumed undefined algorithm)

  • Error number: 1355; Symbol: ER_WARN_VIEW_WITHOUT_KEY; SQLSTATE: HY000

    Message: View being updated does not have complete key of underlying table in it

  • Error number: 1356; Symbol: ER_VIEW_INVALID; SQLSTATE: HY000

    Message: View '%s.%s' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

  • Error number: 1357; Symbol: ER_SP_NO_DROP_SP; SQLSTATE: HY000

    Message: Can't drop or alter a %s from within another stored routine

  • Error number: 1358; Symbol: ER_SP_GOTO_IN_HNDLR; SQLSTATE: HY000

    Message: GOTO is not allowed in a stored procedure handler

  • Error number: 1359; Symbol: ER_TRG_ALREADY_EXISTS; SQLSTATE: HY000

    Message: Trigger already exists

  • Error number: 1360; Symbol: ER_TRG_DOES_NOT_EXIST; SQLSTATE: HY000

    Message: Trigger does not exist

  • Error number: 1361; Symbol: ER_TRG_ON_VIEW_OR_TEMP_TABLE; SQLSTATE: HY000

    Message: Trigger's '%s' is view or temporary table

  • Error number: 1362; Symbol: ER_TRG_CANT_CHANGE_ROW; SQLSTATE: HY000

    Message: Updating of %s row is not allowed in %strigger

  • Error number: 1363; Symbol: ER_TRG_NO_SUCH_ROW_IN_TRG; SQLSTATE: HY000

    Message: There is no %s row in %s trigger

  • Error number: 1364; Symbol: ER_NO_DEFAULT_FOR_FIELD; SQLSTATE: HY000

    Message: Field '%s' doesn't have a default value

  • Error number: 1365; Symbol: ER_DIVISION_BY_ZERO; SQLSTATE: 22012

    Message: Division by 0

  • Error number: 1366; Symbol: ER_TRUNCATED_WRONG_VALUE_FOR_FIELD; SQLSTATE: HY000

    Message: Incorrect %s value: '%s' for column '%s' at row %ld

  • Error number: 1367; Symbol: ER_ILLEGAL_VALUE_FOR_TYPE; SQLSTATE: 22007

    Message: Illegal %s '%s' value found during parsing

  • Error number: 1368; Symbol: ER_VIEW_NONUPD_CHECK; SQLSTATE: HY000

    Message: CHECK OPTION on non-updatable view '%s.%s'

  • Error number: 1369; Symbol: ER_VIEW_CHECK_FAILED; SQLSTATE: HY000

    Message: CHECK OPTION failed '%s.%s'

  • Error number: 1370; Symbol: ER_PROCACCESS_DENIED_ERROR; SQLSTATE: 42000

    Message: %s command denied to user '%s'@'%s' for routine '%s'

  • Error number: 1371; Symbol: ER_RELAY_LOG_FAIL; SQLSTATE: HY000

    Message: Failed purging old relay logs: %s

  • Error number: 1372; Symbol: ER_PASSWD_LENGTH; SQLSTATE: HY000

    Message: Password hash should be a %d-digit hexadecimal number

  • Error number: 1373; Symbol: ER_UNKNOWN_TARGET_BINLOG; SQLSTATE: HY000

    Message: Target log not found in binlog index

  • Error number: 1374; Symbol: ER_IO_ERR_LOG_INDEX_READ; SQLSTATE: HY000

    Message: I/O error reading log index file

  • Error number: 1375; Symbol: ER_BINLOG_PURGE_PROHIBITED; SQLSTATE: HY000

    Message: Server configuration does not permit binlog purge

  • Error number: 1376; Symbol: ER_FSEEK_FAIL; SQLSTATE: HY000

    Message: Failed on fseek()

  • Error number: 1377; Symbol: ER_BINLOG_PURGE_FATAL_ERR; SQLSTATE: HY000

    Message: Fatal error during log purge

  • Error number: 1378; Symbol: ER_LOG_IN_USE; SQLSTATE: HY000

    Message: A purgeable log is in use, will not purge

  • Error number: 1379; Symbol: ER_LOG_PURGE_UNKNOWN_ERR; SQLSTATE: HY000

    Message: Unknown error during log purge

  • Error number: 1380; Symbol: ER_RELAY_LOG_INIT; SQLSTATE: HY000

    Message: Failed initializing relay log position: %s

  • Error number: 1381; Symbol: ER_NO_BINARY_LOGGING; SQLSTATE: HY000

    Message: You are not using binary logging

  • Error number: 1382; Symbol: ER_RESERVED_SYNTAX; SQLSTATE: HY000

    Message: The '%s' syntax is reserved for purposes internal to the MySQL server

  • Error number: 1383; Symbol: ER_WSAS_FAILED; SQLSTATE: HY000

    Message: WSAStartup Failed

  • Error number: 1384; Symbol: ER_DIFF_GROUPS_PROC; SQLSTATE: HY000

    Message: Can't handle procedures with different groups yet

  • Error number: 1385; Symbol: ER_NO_GROUP_FOR_PROC; SQLSTATE: HY000

    Message: Select must have a group with this procedure

  • Error number: 1386; Symbol: ER_ORDER_WITH_PROC; SQLSTATE: HY000

    Message: Can't use ORDER clause with this procedure

  • Error number: 1387; Symbol: ER_LOGGING_PROHIBIT_CHANGING_OF; SQLSTATE: HY000

    Message: Binary logging and replication forbid changing the global server %s

  • Error number: 1388; Symbol: ER_NO_FILE_MAPPING; SQLSTATE: HY000

    Message: Can't map file: %s, errno: %d

  • Error number: 1389; Symbol: ER_WRONG_MAGIC; SQLSTATE: HY000

    Message: Wrong magic in %s

  • Error number: 1390; Symbol: ER_PS_MANY_PARAM; SQLSTATE: HY000

    Message: Prepared statement contains too many placeholders

  • Error number: 1391; Symbol: ER_KEY_PART_0; SQLSTATE: HY000

    Message: Key part '%s' length cannot be 0

  • Error number: 1392; Symbol: ER_VIEW_CHECKSUM; SQLSTATE: HY000

    Message: View text checksum failed

  • Error number: 1393; Symbol: ER_VIEW_MULTIUPDATE; SQLSTATE: HY000

    Message: Can not modify more than one base table through a join view '%s.%s'

  • Error number: 1394; Symbol: ER_VIEW_NO_INSERT_FIELD_LIST; SQLSTATE: HY000

    Message: Can not insert into join view '%s.%s' without fields list

  • Error number: 1395; Symbol: ER_VIEW_DELETE_MERGE_VIEW; SQLSTATE: HY000

    Message: Can not delete from join view '%s.%s'

  • Error number: 1396; Symbol: ER_CANNOT_USER; SQLSTATE: HY000

    Message: Operation %s failed for %s

  • Error number: 1397; Symbol: ER_XAER_NOTA; SQLSTATE: XAE04

    Message: XAER_NOTA: Unknown XID

  • Error number: 1398; Symbol: ER_XAER_INVAL; SQLSTATE: XAE05

    Message: XAER_INVAL: Invalid arguments (or unsupported command)

  • Error number: 1399; Symbol: ER_XAER_RMFAIL; SQLSTATE: XAE07

    Message: XAER_RMFAIL: The command cannot be executed when global transaction is in the %s state

  • Error number: 1400; Symbol: ER_XAER_OUTSIDE; SQLSTATE: XAE09

    Message: XAER_OUTSIDE: Some work is done outside global transaction

  • Error number: 1401; Symbol: ER_XAER_RMERR; SQLSTATE: XAE03

    Message: XAER_RMERR: Fatal error occurred in the transaction branch - check your data for consistency

  • Error number: 1402; Symbol: ER_XA_RBROLLBACK; SQLSTATE: XA100

    Message: XA_RBROLLBACK: Transaction branch was rolled back

  • Error number: 1403; Symbol: ER_NONEXISTING_PROC_GRANT; SQLSTATE: 42000

    Message: There is no such grant defined for user '%s' on host '%s' on routine '%s'

  • Error number: 1404; Symbol: ER_PROC_AUTO_GRANT_FAIL; SQLSTATE: HY000

    Message: Failed to grant EXECUTE and ALTER ROUTINE privileges

  • Error number: 1405; Symbol: ER_PROC_AUTO_REVOKE_FAIL; SQLSTATE: HY000

    Message: Failed to revoke all privileges to dropped routine

  • Error number: 1406; Symbol: ER_DATA_TOO_LONG; SQLSTATE: 22001

    Message: Data too long for column '%s' at row %ld

  • Error number: 1407; Symbol: ER_SP_BAD_SQLSTATE; SQLSTATE: 42000

    Message: Bad SQLSTATE: '%s'

  • Error number: 1408; Symbol: ER_STARTUP; SQLSTATE: HY000

    Message: %s: ready for connections. Version: '%s' socket: '%s' port: %d %s

  • Error number: 1409; Symbol: ER_LOAD_FROM_FIXED_SIZE_ROWS_TO_VAR; SQLSTATE: HY000

    Message: Can't load value from file with fixed size rows to variable

  • Error number: 1410; Symbol: ER_CANT_CREATE_USER_WITH_GRANT; SQLSTATE: 42000

    Message: You are not allowed to create a user with GRANT

  • Error number: 1411; Symbol: ER_WRONG_VALUE_FOR_TYPE; SQLSTATE: HY000

    Message: Incorrect %s value: '%s' for function %s

  • Error number: 1412; Symbol: ER_TABLE_DEF_CHANGED; SQLSTATE: HY000

    Message: Table definition has changed, please retry transaction

  • Error number: 1413; Symbol: ER_SP_DUP_HANDLER; SQLSTATE: 42000

    Message: Duplicate handler declared in the same block

  • Error number: 1414; Symbol: ER_SP_NOT_VAR_ARG; SQLSTATE: 42000

    Message: OUT or INOUT argument %d for routine %s is not a variable or NEW pseudo-variable in BEFORE trigger

  • Error number: 1415; Symbol: ER_SP_NO_RETSET; SQLSTATE: 0A000

    Message: Not allowed to return a result set from a %s

  • Error number: 1416; Symbol: ER_CANT_CREATE_GEOMETRY_OBJECT; SQLSTATE: 22003

    Message: Cannot get geometry object from data you send to the GEOMETRY field

  • Error number: 1417; Symbol: ER_FAILED_ROUTINE_BREAK_BINLOG; SQLSTATE: HY000

    Message: A routine failed and has neither NO SQL nor READS SQL DATA in its declaration and binary logging is enabled; if non-transactional tables were updated, the binary log will miss their changes

  • Error number: 1418; Symbol: ER_BINLOG_UNSAFE_ROUTINE; SQLSTATE: HY000

    Message: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)

  • Error number: 1419; Symbol: ER_BINLOG_CREATE_ROUTINE_NEED_SUPER; SQLSTATE: HY000

    Message: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)

  • Error number: 1420; Symbol: ER_EXEC_STMT_WITH_OPEN_CURSOR; SQLSTATE: HY000

    Message: You can't execute a prepared statement which has an open cursor associated with it. Reset the statement to re-execute it.

  • Error number: 1421; Symbol: ER_STMT_HAS_NO_OPEN_CURSOR; SQLSTATE: HY000

    Message: The statement (%lu) has no open cursor.

  • Error number: 1422; Symbol: ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG; SQLSTATE: HY000

    Message: Explicit or implicit commit is not allowed in stored function or trigger.

  • Error number: 1423; Symbol: ER_NO_DEFAULT_FOR_VIEW_FIELD; SQLSTATE: HY000

    Message: Field of view '%s.%s' underlying table doesn't have a default value

  • Error number: 1424; Symbol: ER_SP_NO_RECURSION; SQLSTATE: HY000

    Message: Recursive stored functions and triggers are not allowed.

  • Error number: 1425; Symbol: ER_TOO_BIG_SCALE; SQLSTATE: 42000

    Message: Too big scale %d specified for column '%s'. Maximum is %lu.

  • Error number: 1426; Symbol: ER_TOO_BIG_PRECISION; SQLSTATE: 42000

    Message: Too big precision %d specified for column '%s'. Maximum is %lu.

  • Error number: 1427; Symbol: ER_M_BIGGER_THAN_D; SQLSTATE: 42000

    Message: For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column '%s').

  • Error number: 1428; Symbol: ER_WRONG_LOCK_OF_SYSTEM_TABLE; SQLSTATE: HY000

    Message: You can't combine write-locking of system tables with other tables or lock types

  • Error number: 1429; Symbol: ER_CONNECT_TO_FOREIGN_DATA_SOURCE; SQLSTATE: HY000

    Message: Unable to connect to foreign data source: %s

  • Error number: 1430; Symbol: ER_QUERY_ON_FOREIGN_DATA_SOURCE; SQLSTATE: HY000

    Message: There was a problem processing the query on the foreign data source. Data source error: %s

  • Error number: 1431; Symbol: ER_FOREIGN_DATA_SOURCE_DOESNT_EXIST; SQLSTATE: HY000

    Message: The foreign data source you are trying to reference does not exist. Data source error: %s

  • Error number: 1432; Symbol: ER_FOREIGN_DATA_STRING_INVALID_CANT_CREATE; SQLSTATE: HY000

    Message: Can't create federated table. The data source connection string '%s' is not in the correct format

  • Error number: 1433; Symbol: ER_FOREIGN_DATA_STRING_INVALID; SQLSTATE: HY000

    Message: The data source connection string '%s' is not in the correct format

  • Error number: 1434; Symbol: ER_CANT_CREATE_FEDERATED_TABLE; SQLSTATE: HY000

    Message: Can't create federated table. Foreign data src error: %s

  • Error number: 1435; Symbol: ER_TRG_IN_WRONG_SCHEMA; SQLSTATE: HY000

    Message: Trigger in wrong schema

  • Error number: 1436; Symbol: ER_STACK_OVERRUN_NEED_MORE; SQLSTATE: HY000

    Message: Thread stack overrun: %ld bytes used of a %ld byte stack, and %ld bytes needed. Use 'mysqld --thread_stack=#' to specify a bigger stack.

  • Error number: 1437; Symbol: ER_TOO_LONG_BODY; SQLSTATE: 42000

    Message: Routine body for '%s' is too long

  • Error number: 1438; Symbol: ER_WARN_CANT_DROP_DEFAULT_KEYCACHE; SQLSTATE: HY000

    Message: Cannot drop default keycache

  • Error number: 1439; Symbol: ER_TOO_BIG_DISPLAYWIDTH; SQLSTATE: 42000

    Message: Display width out of range for column '%s' (max = %lu)

  • Error number: 1440; Symbol: ER_XAER_DUPID; SQLSTATE: XAE08

    Message: XAER_DUPID: The XID already exists

  • Error number: 1441; Symbol: ER_DATETIME_FUNCTION_OVERFLOW; SQLSTATE: 22008

    Message: Datetime function: %s field overflow

  • Error number: 1442; Symbol: ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG; SQLSTATE: HY000

    Message: Can't update table '%s' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.

  • Error number: 1443; Symbol: ER_VIEW_PREVENT_UPDATE; SQLSTATE: HY000

    Message: The definition of table '%s' prevents operation %s on table '%s'.

  • Error number: 1444; Symbol: ER_PS_NO_RECURSION; SQLSTATE: HY000

    Message: The prepared statement contains a stored routine call that refers to that same statement. It's not allowed to execute a prepared statement in such a recursive manner

  • Error number: 1445; Symbol: ER_SP_CANT_SET_AUTOCOMMIT; SQLSTATE: HY000

    Message: Not allowed to set autocommit from a stored function or trigger

  • Error number: 1446; Symbol: ER_MALFORMED_DEFINER; SQLSTATE: HY000

    Message: Definer is not fully qualified

  • Error number: 1447; Symbol: ER_VIEW_FRM_NO_USER; SQLSTATE: HY000

    Message: View '%s'.'%s' has no definer information (old table format). Current user is used as definer. Please recreate the view!

  • Error number: 1448; Symbol: ER_VIEW_OTHER_USER; SQLSTATE: HY000

    Message: You need the SUPER privilege for creation view with '%s'@'%s' definer

  • Error number: 1449; Symbol: ER_NO_SUCH_USER; SQLSTATE: HY000

    Message: The user specified as a definer ('%s'@'%s') does not exist

  • Error number: 1450; Symbol: ER_FORBID_SCHEMA_CHANGE; SQLSTATE: HY000

    Message: Changing schema from '%s' to '%s' is not allowed.

  • Error number: 1451; Symbol: ER_ROW_IS_REFERENCED_2; SQLSTATE: 23000

    Message: Cannot delete or update a parent row: a foreign key constraint fails (%s)

    InnoDB reports this error when you try to delete a parent row that has children, and a foreign key constraint fails. Delete the children first.

  • Error number: 1452; Symbol: ER_NO_REFERENCED_ROW_2; SQLSTATE: 23000

    Message: Cannot add or update a child row: a foreign key constraint fails (%s)

    InnoDB reports this error when you try to add a row but there is no parent row, and a foreign key constraint fails. Add the parent row first.

  • Error number: 1453; Symbol: ER_SP_BAD_VAR_SHADOW; SQLSTATE: 42000

    Message: Variable '%s' must be quoted with `...`, or renamed

  • Error number: 1454; Symbol: ER_TRG_NO_DEFINER; SQLSTATE: HY000

    Message: No definer attribute for trigger '%s'.'%s'. The trigger will be activated under the authorization of the invoker, which may have insufficient privileges. Please recreate the trigger.

  • Error number: 1455; Symbol: ER_OLD_FILE_FORMAT; SQLSTATE: HY000

    Message: '%s' has an old format, you should re-create the '%s' object(s)

  • Error number: 1456; Symbol: ER_SP_RECURSION_LIMIT; SQLSTATE: HY000

    Message: Recursive limit %d (as set by the max_sp_recursion_depth variable) was exceeded for routine %s

  • Error number: 1457; Symbol: ER_SP_PROC_TABLE_CORRUPT; SQLSTATE: HY000

    Message: Failed to load routine %s. The table mysql.proc is missing, corrupt, or contains bad data (internal code %d)

  • Error number: 1458; Symbol: ER_SP_WRONG_NAME; SQLSTATE: 42000

    Message: Incorrect routine name '%s'

  • Error number: 1459; Symbol: ER_TABLE_NEEDS_UPGRADE; SQLSTATE: HY000

    Message: Table upgrade required. Please do "REPAIR TABLE `%s`" or dump/reload to fix it!

  • Error number: 1460; Symbol: ER_SP_NO_AGGREGATE; SQLSTATE: 42000

    Message: AGGREGATE is not supported for stored functions

  • Error number: 1461; Symbol: ER_MAX_PREPARED_STMT_COUNT_REACHED; SQLSTATE: 42000

    Message: Can't create more than max_prepared_stmt_count statements (current value: %lu)

  • Error number: 1462; Symbol: ER_VIEW_RECURSIVE; SQLSTATE: HY000

    Message: `%s`.`%s` contains view recursion

  • Error number: 1463; Symbol: ER_NON_GROUPING_FIELD_USED; SQLSTATE: 42000

    Message: Non-grouping field '%s' is used in %s clause

  • Error number: 1464; Symbol: ER_TABLE_CANT_HANDLE_SPKEYS; SQLSTATE: HY000

    Message: The used table type doesn't support SPATIAL indexes

  • Error number: 1465; Symbol: ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA; SQLSTATE: HY000

    Message: Triggers can not be created on system tables

  • Error number: 1466; Symbol: ER_REMOVED_SPACES; SQLSTATE: HY000

    Message: Leading spaces are removed from name '%s'

  • Error number: 1467; Symbol: ER_AUTOINC_READ_FAILED; SQLSTATE: HY000

    Message: Failed to read auto-increment value from storage engine

  • Error number: 1468; Symbol: ER_USERNAME; SQLSTATE: HY000

    Message: user name

  • Error number: 1469; Symbol: ER_HOSTNAME; SQLSTATE: HY000

    Message: host name

  • Error number: 1470; Symbol: ER_WRONG_STRING_LENGTH; SQLSTATE: HY000

    Message: String '%s' is too long for %s (should be no longer than %d)

  • Error number: 1471; Symbol: ER_NON_INSERTABLE_TABLE; SQLSTATE: HY000

    Message: The target table %s of the %s is not insertable-into

  • Error number: 1472; Symbol: ER_ADMIN_WRONG_MRG_TABLE; SQLSTATE: HY000

    Message: Table '%s' is differently defined or of non-MyISAM type or doesn't exist

  • Error number: 1473; Symbol: ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT; SQLSTATE: HY000

    Message: Too high level of nesting for select

  • Error number: 1474; Symbol: ER_NAME_BECOMES_EMPTY; SQLSTATE: HY000

    Message: Name '%s' has become ''

  • Error number: 1475; Symbol: ER_AMBIGUOUS_FIELD_TERM; SQLSTATE: HY000

    Message: First character of the FIELDS TERMINATED string is ambiguous; please use non-optional and non-empty FIELDS ENCLOSED BY

  • Error number: 1476; Symbol: ER_FOREIGN_SERVER_EXISTS; SQLSTATE: HY000

    Message: The foreign server, %s, you are trying to create already exists.

  • Error number: 1477; Symbol: ER_FOREIGN_SERVER_DOESNT_EXIST; SQLSTATE: HY000

    Message: The foreign server name you are trying to reference does not exist. Data source error: %s

  • Error number: 1478; Symbol: ER_ILLEGAL_HA_CREATE_OPTION; SQLSTATE: HY000

    Message: Table storage engine '%s' does not support the create option '%s'

  • Error number: 1479; Symbol: ER_PARTITION_REQUIRES_VALUES_ERROR; SQLSTATE: HY000

    Message: Syntax error: %s PARTITIONING requires definition of VALUES %s for each partition

  • Error number: 1480; Symbol: ER_PARTITION_WRONG_VALUES_ERROR; SQLSTATE: HY000

    Message: Only %s PARTITIONING can use VALUES %s in partition definition

  • Error number: 1481; Symbol: ER_PARTITION_MAXVALUE_ERROR; SQLSTATE: HY000

    Message: MAXVALUE can only be used in last partition definition

  • Error number: 1482; Symbol: ER_PARTITION_SUBPARTITION_ERROR; SQLSTATE: HY000

    Message: Subpartitions can only be hash partitions and by key

  • Error number: 1483; Symbol: ER_PARTITION_SUBPART_MIX_ERROR; SQLSTATE: HY000

    Message: Must define subpartitions on all partitions if on one partition

  • Error number: 1484; Symbol: ER_PARTITION_WRONG_NO_PART_ERROR; SQLSTATE: HY000

    Message: Wrong number of partitions defined, mismatch with previous setting

  • Error number: 1485; Symbol: ER_PARTITION_WRONG_NO_SUBPART_ERROR; SQLSTATE: HY000

    Message: Wrong number of subpartitions defined, mismatch with previous setting

  • Error number: 1486; Symbol: ER_CONST_EXPR_IN_PARTITION_FUNC_ERROR; SQLSTATE: HY000

    Message: Constant/Random expression in (sub)partitioning function is not allowed

    In 5.5.1: ER_CONST_EXPR_IN_PARTITION_FUNC_ERROR was renamed to ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR.

    ER_CONST_EXPR_IN_PARTITION_FUNC_ERROR was removed after 5.5.0.

  • Error number: 1486; Symbol: ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR; SQLSTATE: HY000

    Message: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed

    In 5.5.1: ER_CONST_EXPR_IN_PARTITION_FUNC_ERROR was renamed to ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR.

    ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR was added in 5.5.1.

  • Error number: 1487; Symbol: ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR; SQLSTATE: HY000

    Message: Expression in RANGE/LIST VALUES must be constant

  • Error number: 1488; Symbol: ER_FIELD_NOT_FOUND_PART_ERROR; SQLSTATE: HY000

    Message: Field in list of fields for partition function not found in table

  • Error number: 1489; Symbol: ER_LIST_OF_FIELDS_ONLY_IN_HASH_ERROR; SQLSTATE: HY000

    Message: List of fields is only allowed in KEY partitions

  • Error number: 1490; Symbol: ER_INCONSISTENT_PARTITION_INFO_ERROR; SQLSTATE: HY000

    Message: The partition info in the frm file is not consistent with what can be written into the frm file

  • Error number: 1491; Symbol: ER_PARTITION_FUNC_NOT_ALLOWED_ERROR; SQLSTATE: HY000

    Message: The %s function returns the wrong type

  • Error number: 1492; Symbol: ER_PARTITIONS_MUST_BE_DEFINED_ERROR; SQLSTATE: HY000

    Message: For %s partitions each partition must be defined

  • Error number: 1493; Symbol: ER_RANGE_NOT_INCREASING_ERROR; SQLSTATE: HY000

    Message: VALUES LESS THAN value must be strictly increasing for each partition

  • Error number: 1494; Symbol: ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR; SQLSTATE: HY000

    Message: VALUES value must be of same type as partition function

  • Error number: 1495; Symbol: ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR; SQLSTATE: HY000

    Message: Multiple definition of same constant in list partitioning

  • Error number: 1496; Symbol: ER_PARTITION_ENTRY_ERROR; SQLSTATE: HY000

    Message: Partitioning can not be used stand-alone in query

  • Error number: 1497; Symbol: ER_MIX_HANDLER_ERROR; SQLSTATE: HY000

    Message: The mix of handlers in the partitions is not allowed in this version of MySQL

  • Error number: 1498; Symbol: ER_PARTITION_NOT_DEFINED_ERROR; SQLSTATE: HY000

    Message: For the partitioned engine it is necessary to define all %s

  • Error number: 1499; Symbol: ER_TOO_MANY_PARTITIONS_ERROR; SQLSTATE: HY000

    Message: Too many partitions (including subpartitions) were defined

  • Error number: 1500; Symbol: ER_SUBPARTITION_ERROR; SQLSTATE: HY000

    Message: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning

  • Error number: 1501; Symbol: ER_CANT_CREATE_HANDLER_FILE; SQLSTATE: HY000

    Message: Failed to create specific handler file

  • Error number: 1502; Symbol: ER_BLOB_FIELD_IN_PART_FUNC_ERROR; SQLSTATE: HY000

    Message: A BLOB field is not allowed in partition function

  • Error number: 1503; Symbol: ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF; SQLSTATE: HY000

    Message: A %s must include all columns in the table's partitioning function

  • Error number: 1504; Symbol: ER_NO_PARTS_ERROR; SQLSTATE: HY000

    Message: Number of %s = 0 is not an allowed value

  • Error number: 1505; Symbol: ER_PARTITION_MGMT_ON_NONPARTITIONED; SQLSTATE: HY000

    Message: Partition management on a not partitioned table is not possible

  • Error number: 1506; Symbol: ER_FOREIGN_KEY_ON_PARTITIONED; SQLSTATE: HY000

    Message: Foreign key clause is not yet supported in conjunction with partitioning

  • Error number: 1507; Symbol: ER_DROP_PARTITION_NON_EXISTENT; SQLSTATE: HY000

    Message: Error in list of partitions to %s

  • Error number: 1508; Symbol: ER_DROP_LAST_PARTITION; SQLSTATE: HY000

    Message: Cannot remove all partitions, use DROP TABLE instead

  • Error number: 1509; Symbol: ER_COALESCE_ONLY_ON_HASH_PARTITION; SQLSTATE: HY000

    Message: COALESCE PARTITION can only be used on HASH/KEY partitions

  • Error number: 1510; Symbol: ER_REORG_HASH_ONLY_ON_SAME_NO; SQLSTATE: HY000

    Message: REORGANIZE PARTITION can only be used to reorganize partitions not to change their numbers

  • Error number: 1511; Symbol: ER_REORG_NO_PARAM_ERROR; SQLSTATE: HY000

    Message: REORGANIZE PARTITION without parameters can only be used on auto-partitioned tables using HASH PARTITIONs

  • Error number: 1512; Symbol: ER_ONLY_ON_RANGE_LIST_PARTITION; SQLSTATE: HY000

    Message: %s PARTITION can only be used on RANGE/LIST partitions

  • Error number: 1513; Symbol: ER_ADD_PARTITION_SUBPART_ERROR; SQLSTATE: HY000

    Message: Trying to Add partition(s) with wrong number of subpartitions

  • Error number: 1514; Symbol: ER_ADD_PARTITION_NO_NEW_PARTITION; SQLSTATE: HY000

    Message: At least one partition must be added

  • Error number: 1515; Symbol: ER_COALESCE_PARTITION_NO_PARTITION; SQLSTATE: HY000

    Message: At least one partition must be coalesced

  • Error number: 1516; Symbol: ER_REORG_PARTITION_NOT_EXIST; SQLSTATE: HY000

    Message: More partitions to reorganize than there are partitions

  • Error number: 1517; Symbol: ER_SAME_NAME_PARTITION; SQLSTATE: HY000

    Message: Duplicate partition name %s

  • Error number: 1518; Symbol: ER_NO_BINLOG_ERROR; SQLSTATE: HY000

    Message: It is not allowed to shut off binlog on this command

  • Error number: 1519; Symbol: ER_CONSECUTIVE_REORG_PARTITIONS; SQLSTATE: HY000

    Message: When reorganizing a set of partitions they must be in consecutive order

  • Error number: 1520; Symbol: ER_REORG_OUTSIDE_RANGE; SQLSTATE: HY000

    Message: Reorganize of range partitions cannot change total ranges except for last partition where it can extend the range

  • Error number: 1521; Symbol: ER_PARTITION_FUNCTION_FAILURE; SQLSTATE: HY000

    Message: Partition function not supported in this version for this handler

  • Error number: 1522; Symbol: ER_PART_STATE_ERROR; SQLSTATE: HY000

    Message: Partition state cannot be defined from CREATE/ALTER TABLE

  • Error number: 1523; Symbol: ER_LIMITED_PART_RANGE; SQLSTATE: HY000

    Message: The %s handler only supports 32 bit integers in VALUES

  • Error number: 1524; Symbol: ER_PLUGIN_IS_NOT_LOADED; SQLSTATE: HY000

    Message: Plugin '%s' is not loaded

  • Error number: 1525; Symbol: ER_WRONG_VALUE; SQLSTATE: HY000

    Message: Incorrect %s value: '%s'

  • Error number: 1526; Symbol: ER_NO_PARTITION_FOR_GIVEN_VALUE; SQLSTATE: HY000

    Message: Table has no partition for value %s

  • Error number: 1527; Symbol: ER_FILEGROUP_OPTION_ONLY_ONCE; SQLSTATE: HY000

    Message: It is not allowed to specify %s more than once

  • Error number: 1528; Symbol: ER_CREATE_FILEGROUP_FAILED; SQLSTATE: HY000

    Message: Failed to create %s

  • Error number: 1529; Symbol: ER_DROP_FILEGROUP_FAILED; SQLSTATE: HY000

    Message: Failed to drop %s

  • Error number: 1530; Symbol: ER_TABLESPACE_AUTO_EXTEND_ERROR; SQLSTATE: HY000

    Message: The handler doesn't support autoextend of tablespaces

  • Error number: 1531; Symbol: ER_WRONG_SIZE_NUMBER; SQLSTATE: HY000

    Message: A size parameter was incorrectly specified, either number or on the form 10M

  • Error number: 1532; Symbol: ER_SIZE_OVERFLOW_ERROR; SQLSTATE: HY000

    Message: The size number was correct but we don't allow the digit part to be more than 2 billion

  • Error number: 1533; Symbol: ER_ALTER_FILEGROUP_FAILED; SQLSTATE: HY000

    Message: Failed to alter: %s

  • Error number: 1534; Symbol: ER_BINLOG_ROW_LOGGING_FAILED; SQLSTATE: HY000

    Message: Writing one row to the row-based binary log failed

  • Error number: 1535; Symbol: ER_BINLOG_ROW_WRONG_TABLE_DEF; SQLSTATE: HY000

    Message: Table definition on master and slave does not match: %s

  • Error number: 1536; Symbol: ER_BINLOG_ROW_RBR_TO_SBR; SQLSTATE: HY000

    Message: Slave running with --log-slave-updates must use row-based binary logging to be able to replicate row-based binary log events

  • Error number: 1537; Symbol: ER_EVENT_ALREADY_EXISTS; SQLSTATE: HY000

    Message: Event '%s' already exists

  • Error number: 1538; Symbol: ER_EVENT_STORE_FAILED; SQLSTATE: HY000

    Message: Failed to store event %s. Error code %d from storage engine.

  • Error number: 1539; Symbol: ER_EVENT_DOES_NOT_EXIST; SQLSTATE: HY000

    Message: Unknown event '%s'

  • Error number: 1540; Symbol: ER_EVENT_CANT_ALTER; SQLSTATE: HY000

    Message: Failed to alter event '%s'

  • Error number: 1541; Symbol: ER_EVENT_DROP_FAILED; SQLSTATE: HY000

    Message: Failed to drop %s

  • Error number: 1542; Symbol: ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG; SQLSTATE: HY000

    Message: INTERVAL is either not positive or too big

  • Error number: 1543; Symbol: ER_EVENT_ENDS_BEFORE_STARTS; SQLSTATE: HY000

    Message: ENDS is either invalid or before STARTS

  • Error number: 1544; Symbol: ER_EVENT_EXEC_TIME_IN_THE_PAST; SQLSTATE: HY000

    Message: Event execution time is in the past. Event has been disabled

  • Error number: 1545; Symbol: ER_EVENT_OPEN_TABLE_FAILED; SQLSTATE: HY000

    Message: Failed to open mysql.event

  • Error number: 1546; Symbol: ER_EVENT_NEITHER_M_EXPR_NOR_M_AT; SQLSTATE: HY000

    Message: No datetime expression provided

  • Error number: 1547; Symbol: ER_COL_COUNT_DOESNT_MATCH_CORRUPTED; SQLSTATE: HY000

    Message: Column count of mysql.%s is wrong. Expected %d, found %d. The table is probably corrupted

  • Error number: 1548; Symbol: ER_CANNOT_LOAD_FROM_TABLE; SQLSTATE: HY000

    Message: Cannot load from mysql.%s. The table is probably corrupted

  • Error number: 1549; Symbol: ER_EVENT_CANNOT_DELETE; SQLSTATE: HY000

    Message: Failed to delete the event from mysql.event

  • Error number: 1550; Symbol: ER_EVENT_COMPILE_ERROR; SQLSTATE: HY000

    Message: Error during compilation of event's body

  • Error number: 1551; Symbol: ER_EVENT_SAME_NAME; SQLSTATE: HY000

    Message: Same old and new event name

  • Error number: 1552; Symbol: ER_EVENT_DATA_TOO_LONG; SQLSTATE: HY000

    Message: Data for column '%s' too long

  • Error number: 1553; Symbol: ER_DROP_INDEX_FK; SQLSTATE: HY000

    Message: Cannot drop index '%s': needed in a foreign key constraint

    InnoDB reports this error when you attempt to drop the last index that can enforce a particular referential constraint.

    For optimal performance with DML statements, InnoDB requires an index to exist on foreign key columns, so that UPDATE and DELETE operations on a parent table can easily check whether corresponding rows exist in the child table. MySQL creates or drops such indexes automatically when needed, as a side-effect of CREATE TABLE, CREATE INDEX, and ALTER TABLE statements.

    When you drop an index, InnoDB checks if the index is used for checking a foreign key constraint. It is still OK to drop the index if there is another index that can be used to enforce the same constraint. InnoDB prevents you from dropping the last index that can enforce a particular referential constraint.

  • Error number: 1554; Symbol: ER_WARN_DEPRECATED_SYNTAX_WITH_VER; SQLSTATE: HY000

    Message: The syntax '%s' is deprecated and will be removed in MySQL %s. Please use %s instead

  • Error number: 1555; Symbol: ER_CANT_WRITE_LOCK_LOG_TABLE; SQLSTATE: HY000

    Message: You can't write-lock a log table. Only read access is possible

  • Error number: 1556; Symbol: ER_CANT_LOCK_LOG_TABLE; SQLSTATE: HY000

    Message: You can't use locks with log tables.

  • Error number: 1557; Symbol: ER_FOREIGN_DUPLICATE_KEY; SQLSTATE: 23000

    Message: Upholding foreign key constraints for table '%s', entry '%s', key %d would lead to a duplicate entry

  • Error number: 1558; Symbol: ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE; SQLSTATE: HY000

    Message: Column count of mysql.%s is wrong. Expected %d, found %d. Created with MySQL %d, now running %d. Please use mysql_upgrade to fix this error.

  • Error number: 1559; Symbol: ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR; SQLSTATE: HY000

    Message: Cannot switch out of the row-based binary log format when the session has open temporary tables

  • Error number: 1560; Symbol: ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_FORMAT; SQLSTATE: HY000

    Message: Cannot change the binary logging format inside a stored function or trigger

  • Error number: 1561; Symbol: ER_NDB_CANT_SWITCH_BINLOG_FORMAT; SQLSTATE: HY000

    Message: The NDB cluster engine does not support changing the binlog format on the fly yet

  • Error number: 1562; Symbol: ER_PARTITION_NO_TEMPORARY; SQLSTATE: HY000

    Message: Cannot create temporary table with partitions

  • Error number: 1563; Symbol: ER_PARTITION_CONST_DOMAIN_ERROR; SQLSTATE: HY000

    Message: Partition constant is out of partition function domain

  • Error number: 1564; Symbol: ER_PARTITION_FUNCTION_IS_NOT_ALLOWED; SQLSTATE: HY000

    Message: This partition function is not allowed

  • Error number: 1565; Symbol: ER_DDL_LOG_ERROR; SQLSTATE: HY000

    Message: Error in DDL log

  • Error number: 1566; Symbol: ER_NULL_IN_VALUES_LESS_THAN; SQLSTATE: HY000

    Message: Not allowed to use NULL value in VALUES LESS THAN

  • Error number: 1567; Symbol: ER_WRONG_PARTITION_NAME; SQLSTATE: HY000

    Message: Incorrect partition name

  • Error number: 1568; Symbol: ER_CANT_CHANGE_TX_ISOLATION; SQLSTATE: 25001

    Message: Transaction isolation level can't be changed while a transaction is in progress

  • Error number: 1569; Symbol: ER_DUP_ENTRY_AUTOINCREMENT_CASE; SQLSTATE: HY000

    Message: ALTER TABLE causes auto_increment resequencing, resulting in duplicate entry '%s' for key '%s'

  • Error number: 1570; Symbol: ER_EVENT_MODIFY_QUEUE_ERROR; SQLSTATE: HY000

    Message: Internal scheduler error %d

  • Error number: 1571; Symbol: ER_EVENT_SET_VAR_ERROR; SQLSTATE: HY000

    Message: Error during starting/stopping of the scheduler. Error code %u

  • Error number: 1572; Symbol: ER_PARTITION_MERGE_ERROR; SQLSTATE: HY000

    Message: Engine cannot be used in partitioned tables

  • Error number: 1573; Symbol: ER_CANT_ACTIVATE_LOG; SQLSTATE: HY000

    Message: Cannot activate '%s' log

  • Error number: 1574; Symbol: ER_RBR_NOT_AVAILABLE; SQLSTATE: HY000

    Message: The server was not built with row-based replication

  • Error number: 1575; Symbol: ER_BASE64_DECODE_ERROR; SQLSTATE: HY000

    Message: Decoding of base64 string failed

  • Error number: 1576; Symbol: ER_EVENT_RECURSION_FORBIDDEN; SQLSTATE: HY000

    Message: Recursion of EVENT DDL statements is forbidden when body is present

  • Error number: 1577; Symbol: ER_EVENTS_DB_ERROR; SQLSTATE: HY000

    Message: Cannot proceed because system tables used by Event Scheduler were found damaged at server start

    To address this issue, try running mysql_upgrade.

  • Error number: 1578; Symbol: ER_ONLY_INTEGERS_ALLOWED; SQLSTATE: HY000

    Message: Only integers allowed as number here

  • Error number: 1579; Symbol: ER_UNSUPORTED_LOG_ENGINE; SQLSTATE: HY000

    Message: This storage engine cannot be used for log tables"

  • Error number: 1580; Symbol: ER_BAD_LOG_STATEMENT; SQLSTATE: HY000

    Message: You cannot '%s' a log table if logging is enabled

  • Error number: 1581; Symbol: ER_CANT_RENAME_LOG_TABLE; SQLSTATE: HY000

    Message: Cannot rename '%s'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to '%s'

  • Error number: 1582; Symbol: ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT; SQLSTATE: 42000

    Message: Incorrect parameter count in the call to native function '%s'

  • Error number: 1583; Symbol: ER_WRONG_PARAMETERS_TO_NATIVE_FCT; SQLSTATE: 42000

    Message: Incorrect parameters in the call to native function '%s'

  • Error number: 1584; Symbol: ER_WRONG_PARAMETERS_TO_STORED_FCT; SQLSTATE: 42000

    Message: Incorrect parameters in the call to stored function '%s'

  • Error number: 1585; Symbol: ER_NATIVE_FCT_NAME_COLLISION; SQLSTATE: HY000

    Message: This function '%s' has the same name as a native function

  • Error number: 1586; Symbol: ER_DUP_ENTRY_WITH_KEY_NAME; SQLSTATE: 23000

    Message: Duplicate entry '%s' for key '%s'

    The format string for this error is also used with ER_DUP_ENTRY.

  • Error number: 1587; Symbol: ER_BINLOG_PURGE_EMFILE; SQLSTATE: HY000

    Message: Too many files opened, please execute the command again

  • Error number: 1588; Symbol: ER_EVENT_CANNOT_CREATE_IN_THE_PAST; SQLSTATE: HY000

    Message: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation.

  • Error number: 1589; Symbol: ER_EVENT_CANNOT_ALTER_IN_THE_PAST; SQLSTATE: HY000

    Message: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation.

  • Error number: 1590; Symbol: ER_SLAVE_INCIDENT; SQLSTATE: HY000

    Message: The incident %s occured on the master. Message: %s

  • Error number: 1591; Symbol: ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT; SQLSTATE: HY000

    Message: Table has no partition for some existing values

  • Error number: 1592; Symbol: ER_BINLOG_UNSAFE_STATEMENT; SQLSTATE: HY000

    Message: Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. %s

  • Error number: 1593; Symbol: ER_SLAVE_FATAL_ERROR; SQLSTATE: HY000

    Message: Fatal error: %s

  • Error number: 1594; Symbol: ER_SLAVE_RELAY_LOG_READ_FAILURE; SQLSTATE: HY000

    Message: Relay log read failure: %s

  • Error number: 1595; Symbol: ER_SLAVE_RELAY_LOG_WRITE_FAILURE; SQLSTATE: HY000

    Message: Relay log write failure: %s

  • Error number: 1596; Symbol: ER_SLAVE_CREATE_EVENT_FAILURE; SQLSTATE: HY000

    Message: Failed to create %s

  • Error number: 1597; Symbol: ER_SLAVE_MASTER_COM_FAILURE; SQLSTATE: HY000

    Message: Master command %s failed: %s

  • Error number: 1598; Symbol: ER_BINLOG_LOGGING_IMPOSSIBLE; SQLSTATE: HY000

    Message: Binary logging not possible. Message: %s

  • Error number: 1599; Symbol: ER_VIEW_NO_CREATION_CTX; SQLSTATE: HY000

    Message: View `%s`.`%s` has no creation context

  • Error number: 1600; Symbol: ER_VIEW_INVALID_CREATION_CTX; SQLSTATE: HY000

    Message: Creation context of view `%s`.`%s' is invalid

  • Error number: 1601; Symbol: ER_SR_INVALID_CREATION_CTX; SQLSTATE: HY000

    Message: Creation context of stored routine `%s`.`%s` is invalid

  • Error number: 1602; Symbol: ER_TRG_CORRUPTED_FILE; SQLSTATE: HY000

    Message: Corrupted TRG file for table `%s`.`%s`

  • Error number: 1603; Symbol: ER_TRG_NO_CREATION_CTX; SQLSTATE: HY000

    Message: Triggers for table `%s`.`%s` have no creation context

  • Error number: 1604; Symbol: ER_TRG_INVALID_CREATION_CTX; SQLSTATE: HY000

    Message: Trigger creation context of table `%s`.`%s` is invalid

  • Error number: 1605; Symbol: ER_EVENT_INVALID_CREATION_CTX; SQLSTATE: HY000

    Message: Creation context of event `%s`.`%s` is invalid

  • Error number: 1606; Symbol: ER_TRG_CANT_OPEN_TABLE; SQLSTATE: HY000

    Message: Cannot open table for trigger `%s`.`%s`

  • Error number: 1607; Symbol: ER_CANT_CREATE_SROUTINE; SQLSTATE: HY000

    Message: Cannot create stored routine `%s`. Check warnings

  • Error number: 1608; Symbol: ER_SLAVE_AMBIGOUS_EXEC_MODE; SQLSTATE: HY000

    Message: Ambiguous slave modes combination. %s

    In 5.5.3: ER_SLAVE_AMBIGOUS_EXEC_MODE was renamed to ER_NEVER_USED.

    ER_SLAVE_AMBIGOUS_EXEC_MODE was removed after 5.5.2.

  • Error number: 1608; Symbol: ER_NEVER_USED; SQLSTATE: HY000

    Message: Ambiguous slave modes combination. %s

    In 5.5.3: ER_SLAVE_AMBIGOUS_EXEC_MODE was renamed to ER_NEVER_USED.

    ER_NEVER_USED was added in 5.5.3.

  • Error number: 1609; Symbol: ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BINLOG_STATEMENT; SQLSTATE: HY000

    Message: The BINLOG statement of type `%s` was not preceded by a format description BINLOG statement.

  • Error number: 1610; Symbol: ER_SLAVE_CORRUPT_EVENT; SQLSTATE: HY000

    Message: Corrupted replication event was detected

  • Error number: 1611; Symbol: ER_LOAD_DATA_INVALID_COLUMN; SQLSTATE: HY000

    Message: Invalid column reference (%s) in LOAD DATA

  • Error number: 1612; Symbol: ER_LOG_PURGE_NO_FILE; SQLSTATE: HY000

    Message: Being purged log %s was not found

  • Error number: 1613; Symbol: ER_XA_RBTIMEOUT; SQLSTATE: XA106

    Message: XA_RBTIMEOUT: Transaction branch was rolled back: took too long

  • Error number: 1614; Symbol: ER_XA_RBDEADLOCK; SQLSTATE: XA102

    Message: XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected

  • Error number: 1615; Symbol: ER_NEED_REPREPARE; SQLSTATE: HY000

    Message: Prepared statement needs to be re-prepared

  • Error number: 1616; Symbol: ER_DELAYED_NOT_SUPPORTED; SQLSTATE: HY000

    Message: DELAYED option not supported for table '%s'

  • Error number: 1617; Symbol: WARN_NO_MASTER_INFO; SQLSTATE: HY000

    Message: The master info structure does not exist

  • Error number: 1618; Symbol: WARN_OPTION_IGNORED; SQLSTATE: HY000

    Message: <%s> option ignored

  • Error number: 1619; Symbol: WARN_PLUGIN_DELETE_BUILTIN; SQLSTATE: HY000

    Message: Built-in plugins cannot be deleted

  • Error number: 1620; Symbol: WARN_PLUGIN_BUSY; SQLSTATE: HY000

    Message: Plugin is busy and will be uninstalled on shutdown

  • Error number: 1621; Symbol: ER_VARIABLE_IS_READONLY; SQLSTATE: HY000

    Message: %s variable '%s' is read-only. Use SET %s to assign the value

  • Error number: 1622; Symbol: ER_WARN_ENGINE_TRANSACTION_ROLLBACK; SQLSTATE: HY000

    Message: Storage engine %s does not support rollback for this statement. Transaction rolled back and must be restarted

  • Error number: 1623; Symbol: ER_SLAVE_HEARTBEAT_FAILURE; SQLSTATE: HY000

    Message: Unexpected master's heartbeat data: %s

  • Error number: 1624; Symbol: ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE; SQLSTATE: HY000

    Message: The requested value for the heartbeat period is either negative or exceeds the maximum allowed (%s seconds).

  • Error number: 1625; Symbol: ER_NDB_REPLICATION_SCHEMA_ERROR; SQLSTATE: HY000

    Message: Bad schema for mysql.ndb_replication table. Message: %s

  • Error number: 1626; Symbol: ER_CONFLICT_FN_PARSE_ERROR; SQLSTATE: HY000

    Message: Error in parsing conflict function. Message: %s

  • Error number: 1627; Symbol: ER_EXCEPTIONS_WRITE_ERROR; SQLSTATE: HY000

    Message: Write to exceptions table failed. Message: %s"

  • Error number: 1628; Symbol: ER_TOO_LONG_TABLE_COMMENT; SQLSTATE: HY000

    Message: Comment for table '%s' is too long (max = %lu)

  • Error number: 1629; Symbol: ER_TOO_LONG_FIELD_COMMENT; SQLSTATE: HY000

    Message: Comment for field '%s' is too long (max = %lu)

  • Error number: 1630; Symbol: ER_FUNC_INEXISTENT_NAME_COLLISION; SQLSTATE: 42000

    Message: FUNCTION %s does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual

  • Error number: 1631; Symbol: ER_DATABASE_NAME; SQLSTATE: HY000

    Message: Database

  • Error number: 1632; Symbol: ER_TABLE_NAME; SQLSTATE: HY000

    Message: Table

  • Error number: 1633; Symbol: ER_PARTITION_NAME; SQLSTATE: HY000

    Message: Partition

  • Error number: 1634; Symbol: ER_SUBPARTITION_NAME; SQLSTATE: HY000

    Message: Subpartition

  • Error number: 1635; Symbol: ER_TEMPORARY_NAME; SQLSTATE: HY000

    Message: Temporary

  • Error number: 1636; Symbol: ER_RENAMED_NAME; SQLSTATE: HY000

    Message: Renamed

  • Error number: 1637; Symbol: ER_TOO_MANY_CONCURRENT_TRXS; SQLSTATE: HY000

    Message: Too many active concurrent transactions

  • Error number: 1638; Symbol: WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED; SQLSTATE: HY000

    Message: Non-ASCII separator arguments are not fully supported

  • Error number: 1639; Symbol: ER_DEBUG_SYNC_TIMEOUT; SQLSTATE: HY000

    Message: debug sync point wait timed out

  • Error number: 1640; Symbol: ER_DEBUG_SYNC_HIT_LIMIT; SQLSTATE: HY000

    Message: debug sync point hit limit reached

  • Error number: 1641; Symbol: ER_DUP_SIGNAL_SET; SQLSTATE: 42000

    Message: Duplicate condition information item '%s'

  • Error number: 1642; Symbol: ER_SIGNAL_WARN; SQLSTATE: 01000

    Message: Unhandled user-defined warning condition

  • Error number: 1643; Symbol: ER_SIGNAL_NOT_FOUND; SQLSTATE: 02000

    Message: Unhandled user-defined not found condition

  • Error number: 1644; Symbol: ER_SIGNAL_EXCEPTION; SQLSTATE: HY000

    Message: Unhandled user-defined exception condition

  • Error number: 1645; Symbol: ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER; SQLSTATE: 0K000

    Message: RESIGNAL when handler not active

  • Error number: 1646; Symbol: ER_SIGNAL_BAD_CONDITION_TYPE; SQLSTATE: HY000

    Message: SIGNAL/RESIGNAL can only use a CONDITION defined with SQLSTATE

  • Error number: 1647; Symbol: WARN_COND_ITEM_TRUNCATED; SQLSTATE: HY000

    Message: Data truncated for condition item '%s'

  • Error number: 1648; Symbol: ER_COND_ITEM_TOO_LONG; SQLSTATE: HY000

    Message: Data too long for condition item '%s'

  • Error number: 1649; Symbol: ER_UNKNOWN_LOCALE; SQLSTATE: HY000

    Message: Unknown locale: '%s'

  • Error number: 1650; Symbol: ER_SLAVE_IGNORE_SERVER_IDS; SQLSTATE: HY000

    Message: The requested server id %d clashes with the slave startup option --replicate-same-server-id

  • Error number: 1651; Symbol: ER_QUERY_CACHE_DISABLED; SQLSTATE: HY000

    Message: Query cache is disabled; restart the server with query_cache_type=1 to enable it

  • Error number: 1652; Symbol: ER_SAME_NAME_PARTITION_FIELD; SQLSTATE: HY000

    Message: Duplicate partition field name '%s'

  • Error number: 1653; Symbol: ER_PARTITION_COLUMN_LIST_ERROR; SQLSTATE: HY000

    Message: Inconsistency in usage of column lists for partitioning

  • Error number: 1654; Symbol: ER_WRONG_TYPE_COLUMN_VALUE_ERROR; SQLSTATE: HY000

    Message: Partition column values of incorrect type

  • Error number: 1655; Symbol: ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR; SQLSTATE: HY000

    Message: Too many fields in '%s'

  • Error number: 1656; Symbol: ER_MAXVALUE_IN_VALUES_IN; SQLSTATE: HY000

    Message: Cannot use MAXVALUE as value in VALUES IN

  • Error number: 1657; Symbol: ER_TOO_MANY_VALUES_ERROR; SQLSTATE: HY000

    Message: Cannot have more than one value for this type of %s partitioning

  • Error number: 1658; Symbol: ER_ROW_SINGLE_PARTITION_FIELD_ERROR; SQLSTATE: HY000

    Message: Row expressions in VALUES IN only allowed for multi-field column partitioning

  • Error number: 1659; Symbol: ER_FIELD_TYPE_NOT_ALLOWED_AS_PARTITION_FIELD; SQLSTATE: HY000

    Message: Field '%s' is of a not allowed type for this type of partitioning

  • Error number: 1660; Symbol: ER_PARTITION_FIELDS_TOO_LONG; SQLSTATE: HY000

    Message: The total length of the partitioning fields is too large

  • Error number: 1661; Symbol: ER_BINLOG_ROW_ENGINE_AND_STMT_ENGINE; SQLSTATE: HY000

    Message: Cannot execute statement: impossible to write to binary log since both row-incapable engines and statement-incapable engines are involved.

    ER_BINLOG_ROW_ENGINE_AND_STMT_ENGINE was added in 5.5.3.

  • Error number: 1662; Symbol: ER_BINLOG_ROW_MODE_AND_STMT_ENGINE; SQLSTATE: HY000

    Message: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = ROW and at least one table uses a storage engine limited to statement-based logging.

    ER_BINLOG_ROW_MODE_AND_STMT_ENGINE was added in 5.5.3.

  • Error number: 1663; Symbol: ER_BINLOG_UNSAFE_AND_STMT_ENGINE; SQLSTATE: HY000

    Message: Cannot execute statement: impossible to write to binary log since statement is unsafe, storage engine is limited to statement-based logging, and BINLOG_FORMAT = MIXED. %s

    ER_BINLOG_UNSAFE_AND_STMT_ENGINE was added in 5.5.3.

  • Error number: 1664; Symbol: ER_BINLOG_ROW_INJECTION_AND_STMT_ENGINE; SQLSTATE: HY000

    Message: Cannot execute statement: impossible to write to binary log since statement is in row format and at least one table uses a storage engine limited to statement-based logging.

    ER_BINLOG_ROW_INJECTION_AND_STMT_ENGINE was added in 5.5.3.

  • Error number: 1665; Symbol: ER_BINLOG_STMT_MODE_AND_ROW_ENGINE; SQLSTATE: HY000

    Message: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging.%s

    ER_BINLOG_STMT_MODE_AND_ROW_ENGINE was added in 5.5.3.

  • Error number: 1666; Symbol: ER_BINLOG_ROW_INJECTION_AND_STMT_MODE; SQLSTATE: HY000

    Message: Cannot execute statement: impossible to write to binary log since statement is in row format and BINLOG_FORMAT = STATEMENT.

    ER_BINLOG_ROW_INJECTION_AND_STMT_MODE was added in 5.5.3.

  • Error number: 1667; Symbol: ER_BINLOG_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE; SQLSTATE: HY000

    Message: Cannot execute statement: impossible to write to binary log since more than one engine is involved and at least one engine is self-logging.

    ER_BINLOG_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE was added in 5.5.3.

  • Error number: 1668; Symbol: ER_BINLOG_UNSAFE_LIMIT; SQLSTATE: HY000

    Message: The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.

    ER_BINLOG_UNSAFE_LIMIT was added in 5.5.3.

  • Error number: 1669; Symbol: ER_BINLOG_UNSAFE_INSERT_DELAYED; SQLSTATE: HY000

    Message: The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted.

    ER_BINLOG_UNSAFE_INSERT_DELAYED was added in 5.5.3.

  • Error number: 1670; Symbol: ER_BINLOG_UNSAFE_SYSTEM_TABLE; SQLSTATE: HY000

    Message: The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves.

    ER_BINLOG_UNSAFE_SYSTEM_TABLE was added in 5.5.3.

  • Error number: 1671; Symbol: ER_BINLOG_UNSAFE_AUTOINC_COLUMNS; SQLSTATE: HY000

    Message: Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.

    ER_BINLOG_UNSAFE_AUTOINC_COLUMNS was added in 5.5.3.

  • Error number: 1672; Symbol: ER_BINLOG_UNSAFE_UDF; SQLSTATE: HY000

    Message: Statement is unsafe because it uses a UDF which may not return the same value on the slave.

    ER_BINLOG_UNSAFE_UDF was added in 5.5.3.

  • Error number: 1673; Symbol: ER_BINLOG_UNSAFE_SYSTEM_VARIABLE; SQLSTATE: HY000

    Message: Statement is unsafe because it uses a system variable that may have a different value on the slave.

    ER_BINLOG_UNSAFE_SYSTEM_VARIABLE was added in 5.5.3.

  • Error number: 1674; Symbol: ER_BINLOG_UNSAFE_SYSTEM_FUNCTION; SQLSTATE: HY000

    Message: Statement is unsafe because it uses a system function that may return a different value on the slave.

    ER_BINLOG_UNSAFE_SYSTEM_FUNCTION was added in 5.5.3.

  • Error number: 1675; Symbol: ER_BINLOG_UNSAFE_NONTRANS_AFTER_TRANS; SQLSTATE: HY000

    Message: Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.

    ER_BINLOG_UNSAFE_NONTRANS_AFTER_TRANS was added in 5.5.3.

  • Error number: 1676; Symbol: ER_MESSAGE_AND_STATEMENT; SQLSTATE: HY000

    Message: %s Statement: %s

    ER_MESSAGE_AND_STATEMENT was added in 5.5.3.

  • Error number: 1677; Symbol: ER_SLAVE_CONVERSION_FAILED; SQLSTATE: HY000

    Message: Column %d of table '%s.%s' cannot be converted from type '%s' to type '%s'

    ER_SLAVE_CONVERSION_FAILED was added in 5.5.3.

  • Error number: 1678; Symbol: ER_SLAVE_CANT_CREATE_CONVERSION; SQLSTATE: HY000

    Message: Can't create conversion table for table '%s.%s'

    ER_SLAVE_CANT_CREATE_CONVERSION was added in 5.5.3.

  • Error number: 1679; Symbol: ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT; SQLSTATE: HY000

    Message: Cannot modify @@session.binlog_format inside a transaction

    ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT was added in 5.5.3.

  • Error number: 1680; Symbol: ER_PATH_LENGTH; SQLSTATE: HY000

    Message: The path specified for %s is too long.

    ER_PATH_LENGTH was added in 5.5.3.

  • Error number: 1681; Symbol: ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT; SQLSTATE: HY000

    Message: '%s' is deprecated and will be removed in a future release.

    ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT was added in 5.5.3.

  • Error number: 1682; Symbol: ER_WRONG_NATIVE_TABLE_STRUCTURE; SQLSTATE: HY000

    Message: Native table '%s'.'%s' has the wrong structure

    ER_WRONG_NATIVE_TABLE_STRUCTURE was added in 5.5.3.

  • Error number: 1683; Symbol: ER_WRONG_PERFSCHEMA_USAGE; SQLSTATE: HY000

    Message: Invalid performance_schema usage.

    ER_WRONG_PERFSCHEMA_USAGE was added in 5.5.3.

  • Error number: 1684; Symbol: ER_WARN_I_S_SKIPPED_TABLE; SQLSTATE: HY000

    Message: Table '%s'.'%s' was skipped since its definition is being modified by concurrent DDL statement

    ER_WARN_I_S_SKIPPED_TABLE was added in 5.5.3.

  • Error number: 1685; Symbol: ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_DIRECT; SQLSTATE: HY000

    Message: Cannot modify @@session.binlog_direct_non_transactional_updates inside a transaction

    ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_DIRECT was added in 5.5.3.

  • Error number: 1686; Symbol: ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_DIRECT; SQLSTATE: HY000

    Message: Cannot change the binlog direct flag inside a stored function or trigger

    ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_DIRECT was added in 5.5.3.

  • Error number: 1687; Symbol: ER_SPATIAL_MUST_HAVE_GEOM_COL; SQLSTATE: 42000

    Message: A SPATIAL index may only contain a geometrical type column

    ER_SPATIAL_MUST_HAVE_GEOM_COL was added in 5.5.2.

  • Error number: 1688; Symbol: ER_TOO_LONG_INDEX_COMMENT; SQLSTATE: HY000

    Message: Comment for index '%s' is too long (max = %lu)

    ER_TOO_LONG_INDEX_COMMENT was added in 5.5.3.

  • Error number: 1689; Symbol: ER_LOCK_ABORTED; SQLSTATE: HY000

    Message: Wait on a lock was aborted due to a pending exclusive lock

    ER_LOCK_ABORTED was added in 5.5.4.

  • Error number: 1690; Symbol: ER_DATA_OUT_OF_RANGE; SQLSTATE: 22003

    Message: %s value is out of range in '%s'

    ER_DATA_OUT_OF_RANGE was added in 5.5.5.

  • Error number: 1691; Symbol: ER_WRONG_SPVAR_TYPE_IN_LIMIT; SQLSTATE: HY000

    Message: A variable of a non-integer based type in LIMIT clause

    ER_WRONG_SPVAR_TYPE_IN_LIMIT was added in 5.5.5.

  • Error number: 1692; Symbol: ER_BINLOG_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE; SQLSTATE: HY000

    Message: Mixing self-logging and non-self-logging engines in a statement is unsafe.

    ER_BINLOG_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE was added in 5.5.5.

  • Error number: 1693; Symbol: ER_BINLOG_UNSAFE_MIXED_STATEMENT; SQLSTATE: HY000

    Message: Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.

    ER_BINLOG_UNSAFE_MIXED_STATEMENT was added in 5.5.5.

  • Error number: 1694; Symbol: ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_SQL_LOG_BIN; SQLSTATE: HY000

    Message: Cannot modify @@session.sql_log_bin inside a transaction

    ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_SQL_LOG_BIN was added in 5.5.5.

  • Error number: 1695; Symbol: ER_STORED_FUNCTION_PREVENTS_SWITCH_SQL_LOG_BIN; SQLSTATE: HY000

    Message: Cannot change the sql_log_bin inside a stored function or trigger

    ER_STORED_FUNCTION_PREVENTS_SWITCH_SQL_LOG_BIN was added in 5.5.5.

  • Error number: 1696; Symbol: ER_FAILED_READ_FROM_PAR_FILE; SQLSTATE: HY000

    Message: Failed to read from the .par file

    ER_FAILED_READ_FROM_PAR_FILE was added in 5.5.5.

  • Error number: 1697; Symbol: ER_VALUES_IS_NOT_INT_TYPE_ERROR; SQLSTATE: HY000

    Message: VALUES value for partition '%s' must have type INT

    ER_VALUES_IS_NOT_INT_TYPE_ERROR was added in 5.5.7.

  • Error number: 1698; Symbol: ER_ACCESS_DENIED_NO_PASSWORD_ERROR; SQLSTATE: 28000

    Message: Access denied for user '%s'@'%s'

    ER_ACCESS_DENIED_NO_PASSWORD_ERROR was added in 5.5.7.

  • Error number: 1699; Symbol: ER_SET_PASSWORD_AUTH_PLUGIN; SQLSTATE: HY000

    Message: SET PASSWORD has no significance for users authenticating via plugins

    ER_SET_PASSWORD_AUTH_PLUGIN was added in 5.5.7.

  • Error number: 1700; Symbol: ER_GRANT_PLUGIN_USER_EXISTS; SQLSTATE: HY000

    Message: GRANT with IDENTIFIED WITH is illegal because the user %-.*s already exists

    ER_GRANT_PLUGIN_USER_EXISTS was added in 5.5.7.

  • Error number: 1701; Symbol: ER_TRUNCATE_ILLEGAL_FK; SQLSTATE: 42000

    Message: Cannot truncate a table referenced in a foreign key constraint (%s)

    ER_TRUNCATE_ILLEGAL_FK was added in 5.5.7.

  • Error number: 1702; Symbol: ER_PLUGIN_IS_PERMANENT; SQLSTATE: HY000

    Message: Plugin '%s' is force_plus_permanent and can not be unloaded

    ER_PLUGIN_IS_PERMANENT was added in 5.5.7.

  • Error number: 1703; Symbol: ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN; SQLSTATE: HY000

    Message: The requested value for the heartbeat period is less than 1 millisecond. The value is reset to 0, meaning that heartbeating will effectively be disabled.

    ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN was added in 5.5.7.

  • Error number: 1704; Symbol: ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX; SQLSTATE: HY000

    Message: The requested value for the heartbeat period exceeds the value of `slave_net_timeout' seconds. A sensible value for the period should be less than the timeout.

    ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX was added in 5.5.7.

  • Error number: 1705; Symbol: ER_STMT_CACHE_FULL; SQLSTATE: HY000

    Message: Multi-row statements required more than 'max_binlog_stmt_cache_size' bytes of storage; increase this mysqld variable and try again

    ER_STMT_CACHE_FULL was added in 5.5.9.

  • Error number: 1706; Symbol: ER_MULTI_UPDATE_KEY_CONFLICT; SQLSTATE: HY000

    Message: Primary key/partition key update is not allowed since the table is updated both as '%s' and '%s'.

    ER_MULTI_UPDATE_KEY_CONFLICT was added in 5.5.11.

  • Error number: 1707; Symbol: ER_TABLE_NEEDS_REBUILD; SQLSTATE: HY000

    Message: Table rebuild required. Please do "ALTER TABLE `%s` FORCE" or dump/reload to fix it!

    ER_TABLE_NEEDS_REBUILD was added in 5.5.11.

  • Error number: 1708; Symbol: WARN_OPTION_BELOW_LIMIT; SQLSTATE: HY000

    Message: The value of '%s' should be no less than the value of '%s'

    WARN_OPTION_BELOW_LIMIT was added in 5.5.12.

  • Error number: 1709; Symbol: ER_INDEX_COLUMN_TOO_LONG; SQLSTATE: HY000

    Message: Index column size too large. The maximum column size is %lu bytes.

    ER_INDEX_COLUMN_TOO_LONG was added in 5.5.14.

  • Error number: 1710; Symbol: ER_ERROR_IN_TRIGGER_BODY; SQLSTATE: HY000

    Message: Trigger '%s' has an error in its body: '%s'

    ER_ERROR_IN_TRIGGER_BODY was added in 5.5.15.

  • Error number: 1711; Symbol: ER_ERROR_IN_UNKNOWN_TRIGGER_BODY; SQLSTATE: HY000

    Message: Unknown trigger has an error in its body: '%s'

    ER_ERROR_IN_UNKNOWN_TRIGGER_BODY was added in 5.5.15.

  • Error number: 1712; Symbol: ER_INDEX_CORRUPT; SQLSTATE: HY000

    Message: Index %s is corrupted

    ER_INDEX_CORRUPT was added in 5.5.17.

  • Error number: 1713; Symbol: ER_UNDO_RECORD_TOO_BIG; SQLSTATE: HY000

    Message: Undo log record is too big.

    ER_UNDO_RECORD_TOO_BIG was added in 5.5.17.

  • Error number: 1714; Symbol: ER_BINLOG_UNSAFE_INSERT_IGNORE_SELECT; SQLSTATE: HY000

    Message: INSERT IGNORE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave.

    ER_BINLOG_UNSAFE_INSERT_IGNORE_SELECT was added in 5.5.18.

  • Error number: 1715; Symbol: ER_BINLOG_UNSAFE_INSERT_SELECT_UPDATE; SQLSTATE: HY000

    Message: INSERT... SELECT... ON DUPLICATE KEY UPDATE is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are updated. This order cannot be predicted and may differ on master and the slave.

    ER_BINLOG_UNSAFE_INSERT_SELECT_UPDATE was added in 5.5.18.

  • Error number: 1716; Symbol: ER_BINLOG_UNSAFE_REPLACE_SELECT; SQLSTATE: HY000

    Message: REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.

    ER_BINLOG_UNSAFE_REPLACE_SELECT was added in 5.5.18.

  • Error number: 1717; Symbol: ER_BINLOG_UNSAFE_CREATE_IGNORE_SELECT; SQLSTATE: HY000

    Message: CREATE... IGNORE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave.

    ER_BINLOG_UNSAFE_CREATE_IGNORE_SELECT was added in 5.5.18.

  • Error number: 1718; Symbol: ER_BINLOG_UNSAFE_CREATE_REPLACE_SELECT; SQLSTATE: HY000

    Message: CREATE... REPLACE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.

    ER_BINLOG_UNSAFE_CREATE_REPLACE_SELECT was added in 5.5.18.

  • Error number: 1719; Symbol: ER_BINLOG_UNSAFE_UPDATE_IGNORE; SQLSTATE: HY000

    Message: UPDATE IGNORE is unsafe because the order in which rows are updated determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave.

    ER_BINLOG_UNSAFE_UPDATE_IGNORE was added in 5.5.18.

  • Error number: 1720; Symbol: ER_PLUGIN_NO_UNINSTALL; SQLSTATE: HY000

    Message: Plugin '%s' is marked as not dynamically uninstallable. You have to stop the server to uninstall it.

    ER_PLUGIN_NO_UNINSTALL was added in 5.5.16.

  • Error number: 1721; Symbol: ER_PLUGIN_NO_INSTALL; SQLSTATE: HY000

    Message: Plugin '%s' is marked as not dynamically installable. You have to stop the server to install it.

    ER_PLUGIN_NO_INSTALL was added in 5.5.16.

  • Error number: 1722; Symbol: ER_BINLOG_UNSAFE_WRITE_AUTOINC_SELECT; SQLSTATE: HY000

    Message: Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave.

    ER_BINLOG_UNSAFE_WRITE_AUTOINC_SELECT was added in 5.5.22.

  • Error number: 1723; Symbol: ER_BINLOG_UNSAFE_CREATE_SELECT_AUTOINC; SQLSTATE: HY000

    Message: CREATE TABLE... SELECT... on a table with an auto-increment column is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are inserted. This order cannot be predicted and may differ on master and the slave.

    ER_BINLOG_UNSAFE_CREATE_SELECT_AUTOINC was added in 5.5.22.

  • Error number: 1724; Symbol: ER_BINLOG_UNSAFE_INSERT_TWO_KEYS; SQLSTATE: HY000

    Message: INSERT... ON DUPLICATE KEY UPDATE on a table with more than one UNIQUE KEY is unsafe

    ER_BINLOG_UNSAFE_INSERT_TWO_KEYS was added in 5.5.24.

  • Error number: 1725; Symbol: ER_TABLE_IN_FK_CHECK; SQLSTATE: HY000

    Message: Table is being used in foreign key check.

    ER_TABLE_IN_FK_CHECK was added in 5.5.24.

  • Error number: 1726; Symbol: ER_UNSUPPORTED_ENGINE; SQLSTATE: HY000

    Message: Storage engine '%s' does not support system tables. [%s.%s]

    ER_UNSUPPORTED_ENGINE was added in 5.5.24.

  • Error number: 1727; Symbol: ER_BINLOG_UNSAFE_AUTOINC_NOT_FIRST; SQLSTATE: HY000

    Message: INSERT into autoincrement field which is not the first part in the composed primary key is unsafe.

    ER_BINLOG_UNSAFE_AUTOINC_NOT_FIRST was added in 5.5.25.

B.3.2 Client Error Message Reference

Client error messages originate from within the MySQL client library. Here is an example client error message, as displayed by the mysql client:

shell> mysql -h no-such-host
ERROR 2005 (HY000): Unknown MySQL server host 'no-such-host' (0)

Each client error message includes an error code, SQLSTATE value, and message string, as described in Section B.1, “Error Message Sources and Components”. These components are available as described in Section B.2, “Error Information Interfaces”. For client errors, the SQLSTATE value is always 'HY000' (general error), so it is not meaningful for distinguishing one client error from another.

The client library also makes available to host client programs any errors that originate on the server side and are recieved by the client from the server. For a list of server-side errors, see Section B.3.1, “Server Error Message Reference”.

In addition to the errors in the following list, the client library can also produce error messages that have error codes in the range from 1 to 999. See Section B.3.3, “Global Error Message Reference”

B.3.3 Global Error Message Reference

This section lists global error messages that are shared in the sense that they can be produced by the MySQL server or by MySQL client programs. These errors have error codes in the range from 1 to 999.

Each global error message includes an error code, SQLSTATE value, and message string, as described in Section B.1, “Error Message Sources and Components”. These components are available as described in Section B.2, “Error Information Interfaces”. For global errors, the SQLSTATE value is always 'HY000' (general error), so it is not meaningful for distinguishing one client error from another.

  • Error number: 1; Symbol: EE_CANTCREATEFILE;

    Message: Can't create/write to file '%s' (Errcode: %d)

  • Error number: 2; Symbol: EE_READ;

    Message: Error reading file '%s' (Errcode: %d)

  • Error number: 3; Symbol: EE_WRITE;

    Message: Error writing file '%s' (Errcode: %d)

  • Error number: 4; Symbol: EE_BADCLOSE;

    Message: Error on close of '%s' (Errcode: %d)

  • Error number: 5; Symbol: EE_OUTOFMEMORY;

    Message: Out of memory (Needed %u bytes)

  • Error number: 6; Symbol: EE_DELETE;

    Message: Error on delete of '%s' (Errcode: %d)

  • Error number: 7; Symbol: EE_LINK;

    Message: Error on rename of '%s' to '%s' (Errcode: %d)

  • Error number: 9; Symbol: EE_EOFERR;

    Message: Unexpected eof found when reading file '%s' (Errcode: %d)

  • Error number: 10; Symbol: EE_CANTLOCK;

    Message: Can't lock file (Errcode: %d)

  • Error number: 11; Symbol: EE_CANTUNLOCK;

    Message: Can't unlock file (Errcode: %d)

  • Error number: 12; Symbol: EE_DIR;

    Message: Can't read dir of '%s' (Errcode: %d)

  • Error number: 13; Symbol: EE_STAT;

    Message: Can't get stat of '%s' (Errcode: %d)

  • Error number: 14; Symbol: EE_CANT_CHSIZE;

    Message: Can't change size of file (Errcode: %d)

  • Error number: 15; Symbol: EE_CANT_OPEN_STREAM;

    Message: Can't open stream from handle (Errcode: %d)

  • Error number: 16; Symbol: EE_GETWD;

    Message: Can't get working dirctory (Errcode: %d)

  • Error number: 17; Symbol: EE_SETWD;

    Message: Can't change dir to '%s' (Errcode: %d)

  • Error number: 18; Symbol: EE_LINK_WARNING;

    Message: Warning: '%s' had %d links

  • Error number: 19; Symbol: EE_OPEN_WARNING;

    Message: Warning: %d files and %d streams is left open

  • Error number: 20; Symbol: EE_DISK_FULL;

    Message: Disk is full writing '%s' (Errcode: %d). Waiting for someone to free space... (Expect up to %d secs delay for server to continue after freeing disk space)

  • Error number: 21; Symbol: EE_CANT_MKDIR;

    Message: Can't create directory '%s' (Errcode: %d)

  • Error number: 22; Symbol: EE_UNKNOWN_CHARSET;

    Message: Character set '%s' is not a compiled character set and is not specified in the '%s' file

  • Error number: 23; Symbol: EE_OUT_OF_FILERESOURCES;

    Message: Out of resources when opening file '%s' (Errcode: %d)

  • Error number: 24; Symbol: EE_CANT_READLINK;

    Message: Can't read value for symlink '%s' (Error %d)

  • Error number: 25; Symbol: EE_CANT_SYMLINK;

    Message: Can't create symlink '%s' pointing at '%s' (Error %d)

  • Error number: 26; Symbol: EE_REALPATH;

    Message: Error on realpath() on '%s' (Error %d)

  • Error number: 27; Symbol: EE_SYNC;

    Message: Can't sync file '%s' to disk (Errcode: %d)

  • Error number: 28; Symbol: EE_UNKNOWN_COLLATION;

    Message: Collation '%s' is not a compiled collation and is not specified in the '%s' file

  • Error number: 29; Symbol: EE_FILENOTFOUND;

    Message: File '%s' not found (Errcode: %d)

  • Error number: 30; Symbol: EE_FILE_NOT_CLOSED;

    Message: File '%s' (fileno: %d) was not closed

  • Error number: 31; Symbol: EE_CHANGE_OWNERSHIP;

    Message: Can't change ownership of the file '%s' (Errcode: %d)

    EE_CHANGE_OWNERSHIP was added in 5.5.6.

  • Error number: 32; Symbol: EE_CHANGE_PERMISSIONS;

    Message: Can't change permissions of the file '%s' (Errcode: %d)

    EE_CHANGE_PERMISSIONS was added in 5.5.6.

  • Error number: 33; Symbol: EE_CANT_SEEK;

    Message: Can't seek in file '%s' (Errcode: %d)

    EE_CANT_SEEK was added in 5.5.9.

B.4 Problems and Common Errors

This section lists some common problems and error messages that you may encounter. It describes how to determine the causes of the problems and what to do to solve them.

B.4.1 How to Determine What Is Causing a Problem

When you run into a problem, the first thing you should do is to find out which program or piece of equipment is causing it:

  • If you have one of the following symptoms, then it is probably a hardware problems (such as memory, motherboard, CPU, or hard disk) or kernel problem:

    • The keyboard does not work. This can normally be checked by pressing the Caps Lock key. If the Caps Lock light does not change, you have to replace your keyboard. (Before doing this, you should try to restart your computer and check all cables to the keyboard.)

    • The mouse pointer does not move.

    • The machine does not answer to a remote machine's pings.

    • Other programs that are not related to MySQL do not behave correctly.

    • Your system restarted unexpectedly. (A faulty user-level program should never be able to take down your system.)

    In this case, you should start by checking all your cables and run some diagnostic tool to check your hardware! You should also check whether there are any patches, updates, or service packs for your operating system that could likely solve your problem. Check also that all your libraries (such as glibc) are up to date.

    It is always good to use a machine with ECC memory to discover memory problems early.

  • If your keyboard is locked up, you may be able to recover by logging in to your machine from another machine and executing kbd_mode -a.

  • Please examine your system log file (/var/log/messages or similar) for reasons for your problem. If you think the problem is in MySQL, you should also examine MySQL's log files. See Section 5.4, “MySQL Server Logs”.

  • If you do not think you have hardware problems, you should try to find out which program is causing problems. Try using top, ps, Task Manager, or some similar program, to check which program is taking all CPU or is locking the machine.

  • Use top, df, or a similar program to check whether you are out of memory, disk space, file descriptors, or some other critical resource.

  • If the problem is some runaway process, you can always try to kill it. If it does not want to die, there is probably a bug in the operating system.

If you have examined all other possibilities and concluded that the MySQL server or a MySQL client is causing the problem, it is time to create a bug report, see Section 1.6, “How to Report Bugs or Problems”. In the bug report, try to give a complete description of how the system is behaving and what you think is happening. Also state why you think that MySQL is causing the problem. Take into consideration all the situations described in this chapter. State any problems exactly how they appear when you examine your system. Use the copy and paste method for any output and error messages from programs and log files.

Try to describe in detail which program is not working and all symptoms you see. We have in the past received many bug reports that state only the system does not work. This provides us with no information about what could be the problem.

If a program fails, it is always useful to know the following information:

  • Has the program in question made a segmentation fault (did it dump core)?

  • Is the program taking up all available CPU time? Check with top. Let the program run for a while, it may simply be evaluating something computationally intensive.

  • If the mysqld server is causing problems, can you get any response from it with mysqladmin -u root ping or mysqladmin -u root processlist?

  • What does a client program say when you try to connect to the MySQL server? (Try with mysql, for example.) Does the client jam? Do you get any output from the program?

When sending a bug report, you should follow the outline described in Section 1.6, “How to Report Bugs or Problems”.

B.4.2 Common Errors When Using MySQL Programs

This section lists some errors that users frequently encounter when running MySQL programs. Although the problems show up when you try to run client programs, the solutions to many of the problems involves changing the configuration of the MySQL server.

B.4.2.1 Access denied

An Access denied error can have many causes. Often the problem is related to the MySQL accounts that the server permits client programs to use when connecting. See Section 6.2, “Access Control and Account Management”, and Section 6.2.13, “Troubleshooting Problems Connecting to MySQL”.

B.4.2.2 Can't connect to [local] MySQL server

A MySQL client on Unix can connect to the mysqld server in two different ways: By using a Unix socket file to connect through a file in the file system (default /tmp/mysql.sock), or by using TCP/IP, which connects through a port number. A Unix socket file connection is faster than TCP/IP, but can be used only when connecting to a server on the same computer. A Unix socket file is used if you do not specify a host name or if you specify the special host name localhost.

If the MySQL server is running on Windows, you can connect using TCP/IP. If the server is started with the named_pipe system variable enabled, you can also connect with named pipes if you run the client on the host where the server is running. The name of the named pipe is MySQL by default. If you do not give a host name when connecting to mysqld, a MySQL client first tries to connect to the named pipe. If that does not work, it connects to the TCP/IP port. You can force the use of named pipes on Windows by using . as the host name.

The error (2002) Can't connect to ... normally means that there is no MySQL server running on the system or that you are using an incorrect Unix socket file name or TCP/IP port number when trying to connect to the server. You should also check that the TCP/IP port you are using has not been blocked by a firewall or port blocking service.

The error (2003) Can't connect to MySQL server on 'server' (10061) indicates that the network connection has been refused. You should check that there is a MySQL server running, that it has network connections enabled, and that the network port you specified is the one configured on the server.

Start by checking whether there is a process named mysqld running on your server host. (Use ps xa | grep mysqld on Unix or the Task Manager on Windows.) If there is no such process, you should start the server. See Section 2.10.2, “Starting the Server”.

If a mysqld process is running, you can check it by trying the following commands. The port number or Unix socket file name might be different in your setup. host_ip represents the IP address of the machine where the server is running.

shell> mysqladmin version
shell> mysqladmin variables
shell> mysqladmin -h `hostname` version variables
shell> mysqladmin -h `hostname` --port=3306 version
shell> mysqladmin -h host_ip version
shell> mysqladmin --protocol=SOCKET --socket=/tmp/mysql.sock version

Note the use of backticks rather than forward quotation marks with the hostname command; these cause the output of hostname (that is, the current host name) to be substituted into the mysqladmin command. If you have no hostname command or are running on Windows, you can manually type the host name of your machine (without backticks) following the -h option. You can also try -h 127.0.0.1 to connect with TCP/IP to the local host.

Make sure that the server has not been configured to ignore network connections or (if you are attempting to connect remotely) that it has not been configured to listen only locally on its network interfaces. If the server was started with the skip_networking system variable enabled, it will not accept TCP/IP connections at all. If the server was started with --bind-address=127.0.0.1, it will listen for TCP/IP connections only locally on the loopback interface and will not accept remote connections.

Check to make sure that there is no firewall blocking access to MySQL. Your firewall may be configured on the basis of the application being executed, or the port number used by MySQL for communication (3306 by default). Under Linux or Unix, check your IP tables (or similar) configuration to ensure that the port has not been blocked. Under Windows, applications such as ZoneAlarm or the Windows XP personal firewall may need to be configured not to block the MySQL port.

Here are some reasons the Can't connect to local MySQL server error might occur:

  • mysqld is not running on the local host. Check your operating system's process list to ensure the mysqld process is present.

  • You're running a MySQL server on Windows with many TCP/IP connections to it. If you're experiencing that quite often your clients get that error, you can find a workaround here: Section B.4.2.2.2, “Connection to MySQL Server Failing on Windows”.

  • Someone has removed the Unix socket file that mysqld uses (/tmp/mysql.sock by default). For example, you might have a cron job that removes old files from the /tmp directory. You can always run mysqladmin version to check whether the Unix socket file that mysqladmin is trying to use really exists. The fix in this case is to change the cron job to not remove mysql.sock or to place the socket file somewhere else. See Section B.4.3.6, “How to Protect or Change the MySQL Unix Socket File”.

  • You have started the mysqld server with the --socket=/path/to/socket option, but forgotten to tell client programs the new name of the socket file. If you change the socket path name for the server, you must also notify the MySQL clients. You can do this by providing the same --socket option when you run client programs. You also need to ensure that clients have permission to access the mysql.sock file. To find out where the socket file is, you can do:

    shell> netstat -ln | grep mysql
    

    See Section B.4.3.6, “How to Protect or Change the MySQL Unix Socket File”.

  • You are using Linux and one server thread has died (dumped core). In this case, you must kill the other mysqld threads (for example, with kill or with the mysql_zap script) before you can restart the MySQL server. See Section B.4.3.3, “What to Do If MySQL Keeps Crashing”.

  • The server or client program might not have the proper access privileges for the directory that holds the Unix socket file or the socket file itself. In this case, you must either change the access privileges for the directory or socket file so that the server and clients can access them, or restart mysqld with a --socket option that specifies a socket file name in a directory where the server can create it and where client programs can access it.

If you get the error message Can't connect to MySQL server on some_host, you can try the following things to find out what the problem is:

  • Check whether the server is running on that host by executing telnet some_host 3306 and pressing the Enter key a couple of times. (3306 is the default MySQL port number. Change the value if your server is listening to a different port.) If there is a MySQL server running and listening to the port, you should get a response that includes the server's version number. If you get an error such as telnet: Unable to connect to remote host: Connection refused, then there is no server running on the given port.

  • If the server is running on the local host, try using mysqladmin -h localhost variables to connect using the Unix socket file. Verify the TCP/IP port number that the server is configured to listen to (it is the value of the port variable.)

  • If you are running under Linux and Security-Enhanced Linux (SELinux) is enabled, see Set SELinux context for MySQL Server.

B.4.2.2.1 Set SELinux context for MySQL Server

The MySQL server reads from and writes to many files, and if the SELinux context is not set correctly on these files then the mysqld process may block access to MySQL files. In some cases, this may stop mysqld from logging errors.

Required Tools

The semanage binary is used in this guide to manage context; on Enterprise Linux it's part of the policycoreutils-python package:

shell> yum install policycoreutils-python
Note

RHEL 6 with Python 2.6: to use semanage with early versions of RHEL 6 with python 2.6, you may need to install a backport of the OrderedDict python collection module using python-pip from the EPEL repository.

List Current MySQL Context

List them using the following:

shell> semanage fcontext -l | grep -i mysql
Set MySQL Data Directory Context

The default data directory location is /var/lib/mysql/; and the SELinux context used is mysqld_db_t.

If you edit the configuration file to use a different location for the data directory, or for any of the files normally in the data directory (such as the binary logs) you may need to set the context for the new location. For example:

shell> semanage fcontext -a -t mysqld_db_t "/path/to/my/custom/datadir(/.*)?"
shell> restorecon -Rv /path/to/my/custom/datadir

shell> semanage fcontext -a -t mysqld_db_t "/path/to/my/custom/logdir(/.*)?"
shell> restorecon -Rv /path/to/my/custom/logdir
Set MySQL Error Log File Context

The default location for RedHat RPMs is /var/log/mysqld.log; and the SELinux context used is mysqld_log_t.

If you edit the configuration file to use a different location then you may need to set the context for the new location. For example:

shell> semanage fcontext -a -t mysqld_log_t "/path/to/my/custom/error.log"
shell> restorecon -Rv /path/to/my/custom/error.log
Set PID File Context

The default location for the PID file is /var/run/mysqld/mysqld.pid; and the SELinux context used is mysqld_var_run_t.

If you edit the configuration file to use a different location then you may need to set the context for the new location. For example:

shell> semanage fcontext -a -t mysqld_var_run_t "/path/to/my/custom/pidfile/directory/.*?"
shell> restorecon -Rv /path/to/my/custom/pidfile/directory
Set unix-domain Socket Context

The default location for the unix-domain socket is /var/lib/mysql/mysql.sock; and the SELinux context used is mysqld_var_run_t.

If you edit the configuration file to use a different location then you may need to set the context for the new location. For example:

shell> semanage fcontext -a -t mysqld_var_run_t "/path/to/my/custom/mysql\.sock"
shell> restorecon -Rv /path/to/my/custom/mysql.sock
Set TCP Port Context

The default TCP port is 3306; and the SELinux context used is mysqld_port_t.

If you edit the configuration file to use a different TCP port, or you enable Group Replication which uses an additional port (typically port 13306), you may need to set the context for the new port. For example:

shell> semanage port -a -t mysqld_port_t -p tcp 13306
shell> restorecon
Set secure_file_priv Directory Context

For MySQL versions since 5.5.53, 5.6.34, 5.7.16, and 8.0.11.

Installing the MySQL server RPM creates a /var/lib/mysql-files/ directory, but does not set the SELinux context on this directory. This directory is intended to be used for operations such as SELECT ... INTO OUTFILE.

If you enabled the use of this directory by setting secure_file_priv, you may need to set the context like so:

shell> semanage fcontext -a -t mysqld_db_t "/var/lib/mysql-files/(/.*)?"
shell> restorecon -Rv /var/lib/mysql-files

Edit this path if you used a different location. For security purposes, this directory should never be within the data directory.

For more information about this variable, see the secure_file_priv documentation.

B.4.2.2.2 Connection to MySQL Server Failing on Windows

When you're running a MySQL server on Windows with many TCP/IP connections to it, and you're experiencing that quite often your clients get a Can't connect to MySQL server error, the reason might be that Windows does not allow for enough ephemeral (short-lived) ports to serve those connections.

The purpose of TIME_WAIT is to keep a connection accepting packets even after the connection has been closed. This is because Internet routing can cause a packet to take a slow route to its destination and it may arrive after both sides have agreed to close. If the port is in use for a new connection, that packet from the old connection could break the protocol or compromise personal information from the original connection. The TIME_WAIT delay prevents this by ensuring that the port cannot be reused until after some time has been permitted for those delayed packets to arrive.

It is safe to reduce TIME_WAIT greatly on LAN connections because there is little chance of packets arriving at very long delays, as they could through the Internet with its comparatively large distances and latencies.

Windows permits ephemeral (short-lived) TCP ports to the user. After any port is closed it will remain in a TIME_WAIT status for 120 seconds. The port will not be available again until this time expires. The default range of port numbers depends on the version of Windows, with a more limited number of ports in older versions:

  • Windows through Server 2003: Ports in range 1025–5000

  • Windows Vista, Server 2008, and newer: Ports in range 49152–65535

With a small stack of available TCP ports (5000) and a high number of TCP ports being open and closed over a short period of time along with the TIME_WAIT status you have a good chance for running out of ports. There are two ways to address this problem:

  • Reduce the number of TCP ports consumed quickly by investigating connection pooling or persistent connections where possible

  • Tune some settings in the Windows registry (see below)

Important

The following procedure involves modifying the Windows registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore it if a problem occurs. For information about how to back up, restore, and edit the registry, view the following article in the Microsoft Knowledge Base: http://support.microsoft.com/kb/256986/EN-US/.

  1. Start Registry Editor (Regedt32.exe).

  2. Locate the following key in the registry:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
    
  3. On the Edit menu, click Add Value, and then add the following registry value:

    Value Name: MaxUserPort
    Data Type: REG_DWORD
    Value: 65534
    

    This sets the number of ephemeral ports available to any user. The valid range is between 5000 and 65534 (decimal). The default value is 0x1388 (5000 decimal).

  4. On the Edit menu, click Add Value, and then add the following registry value:

    Value Name: TcpTimedWaitDelay
    Data Type: REG_DWORD
    Value: 30
    

    This sets the number of seconds to hold a TCP port connection in TIME_WAIT state before closing. The valid range is between 30 and 300 decimal, although you may wish to check with Microsoft for the latest permitted values. The default value is 0x78 (120 decimal).

  5. Quit Registry Editor.

  6. Reboot the machine.

Note: Undoing the above should be as simple as deleting the registry entries you've created.

B.4.2.3 Lost connection to MySQL server

There are three likely causes for this error message.

Usually it indicates network connectivity trouble and you should check the condition of your network if this error occurs frequently. If the error message includes during query, this is probably the case you are experiencing.

Sometimes the during query form happens when millions of rows are being sent as part of one or more queries. If you know that this is happening, you should try increasing net_read_timeout from its default of 30 seconds to 60 seconds or longer, sufficient for the data transfer to complete.

More rarely, it can happen when the client is attempting the initial connection to the server. In this case, if your connect_timeout value is set to only a few seconds, you may be able to resolve the problem by increasing it to ten seconds, perhaps more if you have a very long distance or slow connection. You can determine whether you are experiencing this more uncommon cause by using SHOW GLOBAL STATUS LIKE 'Aborted_connects'. It will increase by one for each initial connection attempt that the server aborts. You may see reading authorization packet as part of the error message; if so, that also suggests that this is the solution that you need.

If the cause is none of those just described, you may be experiencing a problem with BLOB values that are larger than max_allowed_packet, which can cause this error with some clients. Sometime you may see an ER_NET_PACKET_TOO_LARGE error, and that confirms that you need to increase max_allowed_packet.

B.4.2.4 Client does not support authentication protocol

The current implementation of the authentication protocol uses a password hashing algorithm that is incompatible with that used by older (pre-4.1) clients. Attempts to connect to a 4.1 or higher server with an older client may fail with the following message:

shell> mysql
Client does not support authentication protocol requested
by server; consider upgrading MySQL client

To deal with this problem, the preferred solution is to upgrade all client programs to use a 4.1.1 or higher client library. If that is not possible, use one of the following approaches:

  • To connect to the server with a pre-4.1 client program, use an account that still has a pre-4.1-style password.

  • Reset the password to pre-4.1 style for each user that needs to use a pre-4.1 client program. This can be done using the SET PASSWORD statement and the OLD_PASSWORD() function:

    mysql> SET PASSWORD FOR
        -> 'some_user'@'some_host' = OLD_PASSWORD('new_password');
    

    Substitute the password you want to use for new_password in the preceding example. MySQL cannot tell you what the original password was, so you'll need to pick a new one.

  • Tell the server to use the older password hashing algorithm by default:

    1. Start mysqld with the old_passwords system variable set to 1.

    2. Assign an old-format password to each account that has had its password updated to the longer 4.1 format. You can identify these accounts with the following query:

      mysql> SELECT Host, User, Password FROM mysql.user
          -> WHERE LENGTH(Password) > 16;
      

      For each account record displayed by the query, use the Host and User values and assign a password using one of the methods described previously.

The Client does not support authentication protocol error also can occur if multiple versions of MySQL are installed but client programs are dynamically linked and link to an older library. Make sure that clients use the most recent library version with which they are compatible. The procedure to do this will depend on your system.

Note

The PHP mysql extension does not support the authentication protocol in MySQL 4.1.1 and higher. This is true regardless of the PHP version being used. If you wish to use the mysql extension with MySQL 4.1 or higher, you may need to follow one of the options discussed above for configuring MySQL to work with old clients. The mysqli extension (stands for "MySQL, Improved"; added in PHP 5) is compatible with the improved password hashing employed in MySQL 4.1 and higher, and no special configuration of MySQL need be done to use this MySQL client library. For more information about the mysqli extension, see http://php.net/mysqli.

For additional background on password hashing and authentication, see Section 6.1.2.4, “Password Hashing in MySQL”.

B.4.2.5 Password Fails When Entered Interactively

MySQL client programs prompt for a password when invoked with a --password or -p option that has no following password value:

shell> mysql -u user_name -p
Enter password:

On some systems, you may find that your password works when specified in an option file or on the command line, but not when you enter it interactively at the Enter password: prompt. This occurs when the library provided by the system to read passwords limits password values to a small number of characters (typically eight). That is a problem with the system library, not with MySQL. To work around it, change your MySQL password to a value that is eight or fewer characters long, or put your password in an option file.

B.4.2.6 Host 'host_name' is blocked

If the following error occurs, it means that mysqld has received many connection requests from the given host that were interrupted in the middle:

Host 'host_name' is blocked because of many connection errors.
Unblock with 'mysqladmin flush-hosts'

The value of the max_connect_errors system variable determines how many successive interrupted connection requests are permitted. After max_connect_errors failed requests without a successful connection, mysqld assumes that something is wrong (for example, that someone is trying to break in), and blocks the host from further connections until you flush the host cache by executing a FLUSH HOSTS statement or mysqladmin flush-hosts command.

To adjust the permitted number of successive connection errors, set max_connect_errors at server startup. For example, put these lines in the server my.cnf file:

[mysqld]
max_connect_errors=10000

The value can also be set at runtime:

SET GLOBAL max_connect_errors=10000;

If you get the Host 'host_name' is blocked error message for a given host, you should first verify that there is nothing wrong with TCP/IP connections from that host. If you are having network problems, it does no good to increase the value of max_connect_errors.

For more information about how the host cache works, see Section 8.12.5.2, “DNS Lookup Optimization and the Host Cache”.

B.4.2.7 Too many connections

If clients encounter Too many connections errors when attempting to connect to the mysqld server, all available connections are in use by other clients.

The permitted number of connections is controlled by the max_connections system variable. The default value is 151 to improve performance when MySQL is used with the Apache Web server. To support more connections, set max_connections to a larger value.

mysqld actually permits max_connections + 1 client connections. The extra connection is reserved for use by accounts that have the SUPER privilege. By granting the privilege to administrators and not to normal users (who should not need it), an administrator who also has the PROCESS privilege can connect to the server and use SHOW PROCESSLIST to diagnose problems even if the maximum number of unprivileged clients are connected. See Section 13.7.5.30, “SHOW PROCESSLIST Statement”.

For more information about how the server handles client connections, see Section 8.12.5.1, “How MySQL Handles Client Connections”.

B.4.2.8 Out of memory

If you issue a query using the mysql client program and receive an error like the following one, it means that mysql does not have enough memory to store the entire query result:

mysql: Out of memory at line 42, 'malloc.c'
mysql: needed 8136 byte (8k), memory in use: 12481367 bytes (12189k)
ERROR 2008: MySQL client ran out of memory

To remedy the problem, first check whether your query is correct. Is it reasonable that it should return so many rows? If not, correct the query and try again. Otherwise, you can invoke mysql with the --quick option. This causes it to use the mysql_use_result() C API function to retrieve the result set, which places less of a load on the client (but more on the server).

B.4.2.9 MySQL server has gone away

This section also covers the related Lost connection to server during query error.

The most common reason for the MySQL server has gone away error is that the server timed out and closed the connection. In this case, you normally get one of the following error codes (which one you get is operating system-dependent).

Error Code Description
CR_SERVER_GONE_ERROR The client couldn't send a question to the server.
CR_SERVER_LOST The client didn't get an error when writing to the server, but it didn't get a full answer (or any answer) to the question.

By default, the server closes the connection after eight hours if nothing has happened. You can change the time limit by setting the wait_timeout variable when you start mysqld. See Section 5.1.7, “Server System Variables”.

If you have a script, you just have to issue the query again for the client to do an automatic reconnection. This assumes that you have automatic reconnection in the client enabled (which is the default for the mysql command-line client).

Some other common reasons for the MySQL server has gone away error are:

  • You (or the db administrator) has killed the running thread with a KILL statement or a mysqladmin kill command.

  • You tried to run a query after closing the connection to the server. This indicates a logic error in the application that should be corrected.

  • A client application running on a different host does not have the necessary privileges to connect to the MySQL server from that host.

  • You got a timeout from the TCP/IP connection on the client side. This may happen if you have been using the commands: mysql_options(..., MYSQL_OPT_READ_TIMEOUT,...) or mysql_options(..., MYSQL_OPT_WRITE_TIMEOUT,...). In this case increasing the timeout may help solve the problem.

  • You have encountered a timeout on the server side and the automatic reconnection in the client is disabled (the reconnect flag in the MYSQL structure is equal to 0).

  • You are using a Windows client and the server had dropped the connection (probably because wait_timeout expired) before the command was issued.

    The problem on Windows is that in some cases MySQL does not get an error from the OS when writing to the TCP/IP connection to the server, but instead gets the error when trying to read the answer from the connection.

    The solution to this is to either do a mysql_ping() on the connection if there has been a long time since the last query (this is what Connector/ODBC does) or set wait_timeout on the mysqld server so high that it in practice never times out.

  • You can also get these errors if you send a query to the server that is incorrect or too large. If mysqld receives a packet that is too large or out of order, it assumes that something has gone wrong with the client and closes the connection. If you need big queries (for example, if you are working with big BLOB columns), you can increase the query limit by setting the server's max_allowed_packet variable, which has a default value of 1MB. You may also need to increase the maximum packet size on the client end. More information on setting the packet size is given in Section B.4.2.10, “Packet Too Large”.

    An INSERT or REPLACE statement that inserts a great many rows can also cause these sorts of errors. Either one of these statements sends a single request to the server irrespective of the number of rows to be inserted; thus, you can often avoid the error by reducing the number of rows sent per INSERT or REPLACE.

  • It is also possible to see this error if host name lookups fail (for example, if the DNS server on which your server or network relies goes down). This is because MySQL is dependent on the host system for name resolution, but has no way of knowing whether it is working—from MySQL's point of view the problem is indistinguishable from any other network timeout.

    You may also see the MySQL server has gone away error if MySQL is started with the skip_networking system variable enabled,

    Another networking issue that can cause this error occurs if the MySQL port (default 3306) is blocked by your firewall, thus preventing any connections at all to the MySQL server.

  • You can also encounter this error with applications that fork child processes, all of which try to use the same connection to the MySQL server. This can be avoided by using a separate connection for each child process.

  • You have encountered a bug where the server died while executing the query.

You can check whether the MySQL server died and restarted by executing mysqladmin version and examining the server's uptime. If the client connection was broken because mysqld crashed and restarted, you should concentrate on finding the reason for the crash. Start by checking whether issuing the query again kills the server again. See Section B.4.3.3, “What to Do If MySQL Keeps Crashing”.

You can obtain more information about lost connections by starting mysqld with the --log-warnings=2 option. This logs some of the disconnected errors in the hostname.err file. See Section 5.4.2, “The Error Log”.

If you want to create a bug report regarding this problem, be sure that you include the following information:

See also Section B.4.2.11, “Communication Errors and Aborted Connections”, and Section 1.6, “How to Report Bugs or Problems”.

B.4.2.10 Packet Too Large

A communication packet is a single SQL statement sent to the MySQL server, a single row that is sent to the client, or a binary log event sent from a master replication server to a slave.

The largest possible packet that can be transmitted to or from a MySQL 5.5 server or client is 1GB.

When a MySQL client or the mysqld server receives a packet bigger than max_allowed_packet bytes, it issues an ER_NET_PACKET_TOO_LARGE error and closes the connection. With some clients, you may also get a Lost connection to MySQL server during query error if the communication packet is too large.

Both the client and the server have their own max_allowed_packet variable, so if you want to handle big packets, you must increase this variable both in the client and in the server.

If you are using the mysql client program, its default max_allowed_packet variable is 16MB. To set a larger value, start mysql like this:

shell> mysql --max_allowed_packet=32M

That sets the packet size to 32MB.

The server's default max_allowed_packet value is 1MB. You can increase this if the server needs to handle big queries (for example, if you are working with big BLOB columns). For example, to set the variable to 16MB, start the server like this:

shell> mysqld --max_allowed_packet=16M

You can also use an option file to set max_allowed_packet. For example, to set the size for the server to 16MB, add the following lines in an option file:

[mysqld]
max_allowed_packet=16M

It is safe to increase the value of this variable because the extra memory is allocated only when needed. For example, mysqld allocates more memory only when you issue a long query or when mysqld must return a large result row. The small default value of the variable is a precaution to catch incorrect packets between the client and server and also to ensure that you do not run out of memory by using large packets accidentally.

You can also get strange problems with large packets if you are using large BLOB values but have not given mysqld access to enough memory to handle the query. If you suspect this is the case, try adding ulimit -d 256000 to the beginning of the mysqld_safe script and restarting mysqld.

B.4.2.11 Communication Errors and Aborted Connections

If connection problems occur such as communication errors or aborted connections, use these sources of information to diagnose problems:

If you start the server with the --log-warnings option, you might find messages like this in your error log:

Aborted connection 854 to db: 'employees' user: 'josh'

If a client is unable even to connect, the server increments the Aborted_connects status variable. Unsuccessful connection attempts can occur for the following reasons:

If these kinds of things happen, it might indicate that someone is trying to break into your server! If the general query log is enabled, messages for these types of problems are logged to it.

If a client successfully connects but later disconnects improperly or is terminated, the server increments the Aborted_clients status variable, and logs an Aborted connection message to the error log. The cause can be any of the following:

Other reasons for problems with aborted connections or aborted clients:

  • The max_allowed_packet variable value is too small or queries require more memory than you have allocated for mysqld. See Section B.4.2.10, “Packet Too Large”.

  • Use of Ethernet protocol with Linux, both half and full duplex. Some Linux Ethernet drivers have this bug. You should test for this bug by transferring a huge file using FTP between the client and server machines. If a transfer goes in burst-pause-burst-pause mode, you are experiencing a Linux duplex syndrome. Switch the duplex mode for both your network card and hub/switch to either full duplex or to half duplex and test the results to determine the best setting.

  • A problem with the thread library that causes interrupts on reads.

  • Badly configured TCP/IP.

  • Faulty Ethernets, hubs, switches, cables, and so forth. This can be diagnosed properly only by replacing hardware.

See also Section B.4.2.9, “MySQL server has gone away”.

B.4.2.12 The table is full

If a table-full error occurs, it may be that the disk is full or that the table has reached its maximum size. The effective maximum table size for MySQL databases is usually determined by operating system constraints on file sizes, not by MySQL internal limits. See Section 8.4.6, “Limits on Table Size”.

This error can occur sometimes for NDB Cluster tables even when there appears to be more than sufficient data memory available. See the documentation for the DataMemory NDB Cluster data node configuration parameter, as well as Section 18.1.2, “NDB Cluster Nodes, Node Groups, Replicas, and Partitions”, for more information.

B.4.2.13 Can't create/write to file

If you get an error of the following type for some queries, it means that MySQL cannot create a temporary file for the result set in the temporary directory:

Can't create/write to file '\\sqla3fe_0.ism'.

The preceding error is a typical message for Windows; the Unix message is similar.

One fix is to start mysqld with the --tmpdir option or to add the option to the [mysqld] section of your option file. For example, to specify a directory of C:\temp, use these lines:

[mysqld]
tmpdir=C:/temp

The C:\temp directory must exist and have sufficient space for the MySQL server to write to. See Section 4.2.2.2, “Using Option Files”.

Another cause of this error can be permissions issues. Make sure that the MySQL server can write to the tmpdir directory.

Check also the error code that you get with perror. One reason the server cannot write to a table is that the file system is full:

shell> perror 28
OS error code  28:  No space left on device

If you get an error of the following type during startup, it indicates that the file system or directory used for storing data files is write protected. Provided that the write error is to a test file, the error is not serious and can be safely ignored.

Can't create test file /usr/local/mysql/data/master.lower-test

B.4.2.14 Commands out of sync

If you get Commands out of sync; you can't run this command now in your client code, you are calling client functions in the wrong order.

This can happen, for example, if you are using mysql_use_result() and try to execute a new query before you have called mysql_free_result(). It can also happen if you try to execute two queries that return data without calling mysql_use_result() or mysql_store_result() in between.

B.4.2.15 Ignoring user

If you get the following error, it means that when mysqld was started or when it reloaded the grant tables, it found an account in the user table that had an invalid password.

Found wrong password for user 'some_user'@'some_host'; ignoring user

As a result, the account is simply ignored by the permission system.

The following list indicates possible causes of and fixes for this problem:

  • You may be running a new version of mysqld with an old user table. Check whether the Password column of that table is shorter than 16 characters. If so, correct this condition by running mysql_upgrade.

  • The account has an old password (eight characters long). Update the account in the user table to have a new password.

  • You have specified a password in the user table without using the PASSWORD() function. Use mysql to update the account in the user table with a new password, making sure to use the PASSWORD() function:

    mysql> UPDATE user SET Password=PASSWORD('new_password')
        -> WHERE User='some_user' AND Host='some_host';
    

B.4.2.16 Table 'tbl_name' doesn't exist

If you get either of the following errors, it usually means that no table exists in the default database with the given name:

Table 'tbl_name' doesn't exist
Can't find file: 'tbl_name' (errno: 2)

In some cases, it may be that the table does exist but that you are referring to it incorrectly:

  • Because MySQL uses directories and files to store databases and tables, database and table names are case sensitive if they are located on a file system that has case-sensitive file names.

  • Even for file systems that are not case-sensitive, such as on Windows, all references to a given table within a query must use the same lettercase.

You can check which tables are in the default database with SHOW TABLES. See Section 13.7.5, “SHOW Statements”.

B.4.2.17 Can't initialize character set

You might see an error like this if you have character set problems:

MySQL Connection Failed: Can't initialize character set charset_name

This error can have any of the following causes:

B.4.2.18 File Not Found and Similar Errors

If you get ERROR 'file_name' not found (errno: 23), Can't open file: file_name (errno: 24), or any other error with errno 23 or errno 24 from MySQL, it means that you have not allocated enough file descriptors for the MySQL server. You can use the perror utility to get a description of what the error number means:

shell> perror 23
OS error code  23:  File table overflow
shell> perror 24
OS error code  24:  Too many open files
shell> perror 11
OS error code  11:  Resource temporarily unavailable

The problem here is that mysqld is trying to keep open too many files simultaneously. You can either tell mysqld not to open so many files at once or increase the number of file descriptors available to mysqld.

To tell mysqld to keep open fewer files at a time, you can make the table cache smaller by reducing the value of the table_open_cache system variable (the default value is 64). This may not entirely prevent running out of file descriptors because in some circumstances the server may attempt to extend the cache size temporarily, as described in Section 8.4.3.1, “How MySQL Opens and Closes Tables”. Reducing the value of max_connections also reduces the number of open files (the default value is 100).

To change the number of file descriptors available to mysqld, you can use the --open-files-limit option to mysqld_safe or set the open_files_limit system variable. See Section 5.1.7, “Server System Variables”. The easiest way to set these values is to add an option to your option file. See Section 4.2.2.2, “Using Option Files”. If you have an old version of mysqld that does not support setting the open files limit, you can edit the mysqld_safe script. There is a commented-out line ulimit -n 256 in the script. You can remove the # character to uncomment this line, and change the number 256 to set the number of file descriptors to be made available to mysqld.

--open-files-limit and ulimit can increase the number of file descriptors, but only up to the limit imposed by the operating system. There is also a hard limit that can be overridden only if you start mysqld_safe or mysqld as root (just remember that you also need to start the server with the --user option in this case so that it does not continue to run as root after it starts up). If you need to increase the operating system limit on the number of file descriptors available to each process, consult the documentation for your system.

Note

If you run the tcsh shell, ulimit does not work! tcsh also reports incorrect values when you ask for the current limits. In this case, you should start mysqld_safe using sh.

B.4.2.19 Table-Corruption Issues

If you have started mysqld with the myisam_recover_options system variable set, MySQL automatically checks and tries to repair MyISAM tables if they are marked as 'not closed properly' or 'crashed'. If this happens, MySQL writes an entry in the hostname.err file 'Warning: Checking table ...' which is followed by Warning: Repairing table if the table needs to be repaired. If you get a lot of these errors, without mysqld having died unexpectedly just before, then something is wrong and needs to be investigated further.

As of MySQL 5.5.3, when the server detects MyISAM table corruption, it writes additional information to the error log, such as the name and line number of the source file, and the list of threads accessing the table. Example: Got an error from thread_id=1, mi_dynrec.c:368. This is useful information to include in bug reports.

See also Section 5.1.6, “Server Command Options”, and Section 24.5.1.7, “Making a Test Case If You Experience Table Corruption”.

B.4.3 Administration-Related Issues

B.4.3.1 Problems with File Permissions

If you have problems with file permissions, the UMASK or UMASK_DIR environment variable might be set incorrectly when mysqld starts. For example, mysqld might issue the following error message when you create a table:

ERROR: Can't find file: 'path/with/filename.frm' (Errcode: 13)

The default UMASK and UMASK_DIR values are 0660 and 0700, respectively. mysqld assumes that the value for UMASK or UMASK_DIR is in octal if it starts with a zero. For example, setting UMASK=0600 is equivalent to UMASK=384 because 0600 octal is 384 decimal.

Assuming that you start mysqld using mysqld_safe, change the default UMASK value as follows:

UMASK=384  # = 600 in octal
export UMASK
mysqld_safe &
Note

An exception applies for the error log file if you start mysqld using mysqld_safe, which does not respect UMASK: mysqld_safe may create the error log file if it does not exist prior to starting mysqld, and mysqld_safe uses a umask set to a strict value of 0137. If this is unsuitable, create the error file manually with the desired access mode prior to executing mysqld_safe.

By default, mysqld creates database directories with an access permission value of 0700. To modify this behavior, set the UMASK_DIR variable. If you set its value, new directories are created with the combined UMASK and UMASK_DIR values. For example, to give group access to all new directories, start mysqld_safe as follows:

UMASK_DIR=504  # = 770 in octal
export UMASK_DIR
mysqld_safe &

For additional details, see Section 4.9, “MySQL Environment Variables”.

B.4.3.2 How to Reset the Root Password

If you have never assigned a root password for MySQL, the server does not require a password at all for connecting as root. However, this is insecure. For instructions on assigning passwords, see Section 2.10.4, “Securing the Initial MySQL Accounts”.

If you know the root password and want to change it, see Section 13.7.1.6, “SET PASSWORD Statement”.

If you assigned a root password previously but have forgotten it, you can assign a new password. The following sections provide instructions for Windows and Unix and Unix-like systems, as well as generic instructions that apply to any system.

B.4.3.2.1 Resetting the Root Password: Windows Systems

On Windows, use the following procedure to reset the password for the MySQL 'root'@'localhost' account. To change the password for a root account with a different host name part, modify the instructions to use that host name.

  1. Log on to your system as Administrator.

  2. Stop the MySQL server if it is running. For a server that is running as a Windows service, go to the Services manager: From the Start menu, select Control Panel, then Administrative Tools, then Services. Find the MySQL service in the list and stop it.

    If your server is not running as a service, you may need to use the Task Manager to force it to stop.

  3. Create a text file containing the following statement on a single line. Replace the password with the password that you want to use.

    SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass');
    
  4. Save the file. This example assumes that you name the file C:\mysql-init.txt.

  5. Open a console window to get to the command prompt: From the Start menu, select Run, then enter cmd as the command to be run.

  6. Start the MySQL server with the init_file system variable set to name the file (notice that the backslash in the option value is doubled):

    C:\> cd "C:\Program Files\MySQL\MySQL Server 5.5\bin"
    C:\> mysqld --init-file=C:\\mysql-init.txt
    

    If you installed MySQL to a different location, adjust the cd command accordingly.

    The server executes the contents of the file named by the init_file system variable at startup, changing the 'root'@'localhost' account password.

    To have server output to appear in the console window rather than in a log file, add the --console option to the mysqld command.

    If you installed MySQL using the MySQL Installation Wizard, you may need to specify a --defaults-file option. For example:

    C:\> mysqld
             --defaults-file="C:\\ProgramData\\MySQL\\MySQL Server 5.5\\my.ini"
             --init-file=C:\\mysql-init.txt
    

    The appropriate --defaults-file setting can be found using the Services Manager: From the Start menu, select Control Panel, then Administrative Tools, then Services. Find the MySQL service in the list, right-click it, and choose the Properties option. The Path to executable field contains the --defaults-file setting.

  7. After the server has started successfully, delete C:\mysql-init.txt.

You should now be able to connect to the MySQL server as root using the new password. Stop the MySQL server and restart it normally. If you run the server as a service, start it from the Windows Services window. If you start the server manually, use whatever command you normally use.

B.4.3.2.2 Resetting the Root Password: Unix and Unix-Like Systems

On Unix, use the following procedure to reset the password for the MySQL 'root'@'localhost' account. To change the password for a root account with a different host name part, modify the instructions to use that host name.

The instructions assume that you will start the MySQL server from the Unix login account that you normally use for running it. For example, if you run the server using the mysql login account, you should log in as mysql before using the instructions. Alternatively, you can log in as root, but in this case you must start mysqld with the --user=mysql option. If you start the server as root without using --user=mysql, the server may create root-owned files in the data directory, such as log files, and these may cause permission-related problems for future server startups. If that happens, you will need to either change the ownership of the files to mysql or remove them.

  1. Log on to your system as the Unix user that the MySQL server runs as (for example, mysql).

  2. Stop the MySQL server if it is running. Locate the .pid file that contains the server's process ID. The exact location and name of this file depend on your distribution, host name, and configuration. Common locations are /var/lib/mysql/, /var/run/mysqld/, and /usr/local/mysql/data/. Generally, the file name has an extension of .pid and begins with either mysqld or your system's host name.

    Stop the MySQL server by sending a normal kill (not kill -9) to the mysqld process. Use the actual path name of the .pid file in the following command:

    shell> kill `cat /mysql-data-directory/host_name.pid`
    

    Use backticks (not forward quotation marks) with the cat command. These cause the output of cat to be substituted into the kill command.

  3. Create a text file containing the following statement on a single line. Replace the password with the password that you want to use.

    SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass');
    
  4. Save the file. This example assumes that you name the file /home/me/mysql-init. The file contains the password, so do not save it where it can be read by other users. If you are not logged in as mysql (the user the server runs as), make sure that the file has permissions that permit mysql to read it.

  5. Start the MySQL server with the init_file system variable set to name the file:

    shell> mysqld --init-file=/home/me/mysql-init &
    

    The server executes the contents of the file named by the init_file system variable at startup, changing the 'root'@'localhost' account password.

    Other options may be necessary as well, depending on how you normally start your server. For example, --defaults-file may be needed before the init_file argument.

  6. After the server has started successfully, delete /home/me/mysql-init.

You should now be able to connect to the MySQL server as root using the new password. Stop the server and restart it normally.

B.4.3.2.3 Resetting the Root Password: Generic Instructions

The preceding sections provide password-resetting instructions specifically for Windows and Unix and Unix-like systems. Alternatively, on any platform, you can reset the password using the mysql client (but this approach is less secure):

  1. Stop the MySQL server if necessary, then restart it with the --skip-grant-tables option. This enables anyone to connect without a password and with all privileges, and disables account-management statements such as SET PASSWORD. Because this is insecure, you might want to use --skip-grant-tables in conjunction with enabling the skip_networking system variable to prevent remote clients from connecting.

  2. Connect to the MySQL server using the mysql client; no password is necessary because the server was started with --skip-grant-tables:

    shell> mysql
    
  3. In the mysql client, tell the server to reload the grant tables so that account-management statements work:

    mysql> FLUSH PRIVILEGES;
    

    Then change the 'root'@'localhost' account password. Replace the password with the password that you want to use. To change the password for a root account with a different host name part, modify the instructions to use that host name.

    mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass');
    

You should now be able to connect to the MySQL server as root using the new password. Stop the server and restart it normally (without the --skip-grant-tables option and without enabling the skip_networking system variable).

B.4.3.3 What to Do If MySQL Keeps Crashing

Each MySQL version is tested on many platforms before it is released. This does not mean that there are no bugs in MySQL, but if there are bugs, they should be very few and can be hard to find. If you have a problem, it always helps if you try to find out exactly what crashes your system, because you have a much better chance of getting the problem fixed quickly.

First, you should try to find out whether the problem is that the mysqld server dies or whether your problem has to do with your client. You can check how long your mysqld server has been up by executing mysqladmin version. If mysqld has died and restarted, you may find the reason by looking in the server's error log. See Section 5.4.2, “The Error Log”.

On some systems, you can find in the error log a stack trace of where mysqld died that you can resolve with the resolve_stack_dump program. See Section 24.5, “Debugging and Porting MySQL”. Note that the variable values written in the error log may not always be 100% correct.

Many server crashes are caused by corrupted data files or index files. MySQL updates the files on disk with the write() system call after every SQL statement and before the client is notified about the result. (This is not true if you are running with the delay_key_write system variable enabled, in which case data files are written but not index files.) This means that data file contents are safe even if mysqld crashes, because the operating system ensures that the unflushed data is written to disk. You can force MySQL to flush everything to disk after every SQL statement by starting mysqld with the --flush option.

The preceding means that normally you should not get corrupted tables unless one of the following happens:

  • The MySQL server or the server host was killed in the middle of an update.

  • You have found a bug in mysqld that caused it to die in the middle of an update.

  • Some external program is manipulating data files or index files at the same time as mysqld without locking the table properly.

  • You are running many mysqld servers using the same data directory on a system that does not support good file system locks (normally handled by the lockd lock manager), or you are running multiple servers with external locking disabled.

  • You have a crashed data file or index file that contains very corrupt data that confused mysqld.

  • You have found a bug in the data storage code. This isn't likely, but it is at least possible. In this case, you can try to change the storage engine to another engine by using ALTER TABLE on a repaired copy of the table.

Because it is very difficult to know why something is crashing, first try to check whether things that work for others crash for you. Please try the following things:

  • Stop the mysqld server with mysqladmin shutdown, run myisamchk --silent --force */*.MYI from the data directory to check all MyISAM tables, and restart mysqld. This ensures that you are running from a clean state. See Chapter 5, MySQL Server Administration.

  • Start mysqld with the general query log enabled (see Section 5.4.3, “The General Query Log”). Then try to determine from the information written to the log whether some specific query kills the server. About 95% of all bugs are related to a particular query. Normally, this is one of the last queries in the log file just before the server restarts. See Section 5.4.3, “The General Query Log”. If you can repeatedly kill MySQL with a specific query, even when you have checked all tables just before issuing it, then you have been able to locate the bug and should submit a bug report for it. See Section 1.6, “How to Report Bugs or Problems”.

  • Try to make a test case that we can use to repeat the problem. See Section 24.5, “Debugging and Porting MySQL”.

  • Try the fork_big.pl script. (It is located in the tests directory of source distributions.)

  • If you configure MySQL for debugging, it is much easier to gather information about possible errors if something goes wrong. Reconfigure MySQL with the -DWITH_DEBUG=1 option to CMake and then recompile. See Section 24.5, “Debugging and Porting MySQL”.

  • Make sure that you have applied the latest patches for your operating system.

  • Use the --skip-external-locking option to mysqld. On some systems, the lockd lock manager does not work properly; the --skip-external-locking option tells mysqld not to use external locking. (This means that you cannot run two mysqld servers on the same data directory and that you must be careful if you use myisamchk. Nevertheless, it may be instructive to try the option as a test.)

  • Have you tried mysqladmin -u root processlist when mysqld appears to be running but not responding? Sometimes mysqld is not comatose even though you might think so. The problem may be that all connections are in use, or there may be some internal lock problem. mysqladmin -u root processlist usually is able to make a connection even in these cases, and can provide useful information about the current number of connections and their status.

  • Run the command mysqladmin -i 5 status or mysqladmin -i 5 -r status in a separate window to produce statistics while you run your other queries.

  • Try the following:

    1. Start mysqld from gdb (or another debugger). See Section 24.5, “Debugging and Porting MySQL”.

    2. Run your test scripts.

    3. Print the backtrace and the local variables at the three lowest levels. In gdb, you can do this with the following commands when mysqld has crashed inside gdb:

      backtrace
      info local
      up
      info local
      up
      info local
      

      With gdb, you can also examine which threads exist with info threads and switch to a specific thread with thread N, where N is the thread ID.

  • Try to simulate your application with a Perl script to force MySQL to crash or misbehave.

  • Send a normal bug report. See Section 1.6, “How to Report Bugs or Problems”. Be even more detailed than usual. Because MySQL works for many people, it may be that the crash results from something that exists only on your computer (for example, an error that is related to your particular system libraries).

  • If you have a problem with tables containing dynamic-length rows and you are using only VARCHAR columns (not BLOB or TEXT columns), you can try to change all VARCHAR to CHAR with ALTER TABLE. This forces MySQL to use fixed-size rows. Fixed-size rows take a little extra space, but are much more tolerant to corruption.

    The current dynamic row code has been in use for several years with very few problems, but dynamic-length rows are by nature more prone to errors, so it may be a good idea to try this strategy to see whether it helps.

  • Do not rule out your server hardware when diagnosing problems. Defective hardware can be the cause of data corruption. Particular attention should be paid to your memory and disk subsystems when troubleshooting hardware.

B.4.3.4 How MySQL Handles a Full Disk

This section describes how MySQL responds to disk-full errors (such as no space left on device), and to quota-exceeded errors (such as write failed or user block limit reached).

This section is relevant for writes to MyISAM tables. It also applies for writes to binary log files and binary log index file, except that references to row and record should be understood to mean event.

When a disk-full condition occurs, MySQL does the following:

  • It checks once every minute to see whether there is enough space to write the current row. If there is enough space, it continues as if nothing had happened.

  • Every 10 minutes it writes an entry to the log file, warning about the disk-full condition.

To alleviate the problem, you can take the following actions:

  • To continue, you only have to free enough disk space to insert all records.

  • To abort the thread, you must use mysqladmin kill. The thread is aborted the next time it checks the disk (in one minute).

  • Other threads might be waiting for the table that caused the disk-full condition. If you have several locked threads, killing the one thread that is waiting on the disk-full condition enables the other threads to continue.

Exceptions to the preceding behavior are when you use REPAIR TABLE or OPTIMIZE TABLE or when the indexes are created in a batch after LOAD DATA or after an ALTER TABLE statement. All of these statements may create large temporary files that, if left to themselves, would cause big problems for the rest of the system. If the disk becomes full while MySQL is doing any of these operations, it removes the big temporary files and mark the table as crashed. The exception is that for ALTER TABLE, the old table is left unchanged.

B.4.3.5 Where MySQL Stores Temporary Files

On Unix, MySQL uses the value of the TMPDIR environment variable as the path name of the directory in which to store temporary files. If TMPDIR is not set, MySQL uses the system default, which is usually /tmp, /var/tmp, or /usr/tmp.

On Windows, MySQL checks in order the values of the TMPDIR, TEMP, and TMP environment variables. For the first one found to be set, MySQL uses it and does not check those remaining. If none of TMPDIR, TEMP, or TMP are set, MySQL uses the Windows system default, which is usually C:\windows\temp\.

If the file system containing your temporary file directory is too small, you can use the mysqld --tmpdir option to specify a directory in a file system where you have enough space. On replication slaves, you can use the slave_load_tmpdir system variable to specify a separate directory for holding temporary files when replicating LOAD DATA statements.

The --tmpdir option can be set to a list of several paths that are used in round-robin fashion. Paths should be separated by colon characters (:) on Unix and semicolon characters (;) on Windows.

Note

To spread the load effectively, these paths should be located on different physical disks, not different partitions of the same disk.

If the MySQL server is acting as a replication slave, you should be sure to set slave_load_tmpdir not to point to a directory that is on a memory-based file system or to a directory that is cleared when the server host restarts. A replication slave needs some of its temporary files to survive a machine restart so that it can replicate temporary tables or LOAD DATA operations. If files in the slave temporary file directory are lost when the server restarts, replication fails.

MySQL arranges that temporary files are removed if mysqld is terminated. On platforms that support it (such as Unix), this is done by unlinking the file after opening it. The disadvantage of this is that the name does not appear in directory listings and you do not see a big temporary file that fills up the file system in which the temporary file directory is located. (In such cases, lsof +L1 may be helpful in identifying large files associated with mysqld.)

When sorting (ORDER BY or GROUP BY), MySQL normally uses one or two temporary files. The maximum disk space required is determined by the following expression:

(length of what is sorted + sizeof(row pointer))
* number of matched rows
* 2

The row pointer size is usually four bytes, but may grow in the future for really big tables.

For some statements, MySQL creates temporary SQL tables that are not hidden and have names that begin with #sql.

Some SELECT queries creates temporary SQL tables to hold intermediate results.

ALTER TABLE creates a temporary copy of the original table in the same directory as the original table.

See also Orphan Temporary Tables.

B.4.3.6 How to Protect or Change the MySQL Unix Socket File

The default location for the Unix socket file that the server uses for communication with local clients is /tmp/mysql.sock. (For some distribution formats, the directory might be different, such as /var/lib/mysql for RPMs.)

On some versions of Unix, anyone can delete files in the /tmp directory or other similar directories used for temporary files. If the socket file is located in such a directory on your system, this might cause problems.

On most versions of Unix, you can protect your /tmp directory so that files can be deleted only by their owners or the superuser (root). To do this, set the sticky bit on the /tmp directory by logging in as root and using the following command:

shell> chmod +t /tmp

You can check whether the sticky bit is set by executing ls -ld /tmp. If the last permission character is t, the bit is set.

Another approach is to change the place where the server creates the Unix socket file. If you do this, you should also let client programs know the new location of the file. You can specify the file location in several ways:

You can test whether the new socket location works by attempting to connect to the server with this command:

shell> mysqladmin --socket=/path/to/socket version

B.4.3.7 Time Zone Problems

If you have a problem with SELECT NOW() returning values in UTC and not your local time, you have to tell the server your current time zone. The same applies if UNIX_TIMESTAMP() returns the wrong value. This should be done for the environment in which the server runs (for example, in mysqld_safe or mysql.server). See Section 4.9, “MySQL Environment Variables”.

You can set the time zone for the server with the --timezone=timezone_name option to mysqld_safe. You can also set it by setting the TZ environment variable before you start mysqld.

The permissible values for --timezone or TZ are system dependent. Consult your operating system documentation to see what values are acceptable.

B.4.4 Query-Related Issues

B.4.4.1 Case Sensitivity in String Searches

For nonbinary strings (CHAR, VARCHAR, TEXT), string searches use the collation of the comparison operands. For binary strings (BINARY, VARBINARY, BLOB), comparisons use the numeric values of the bytes in the operands; this means that for alphabetic characters, comparisons will be case-sensitive.

A comparison between a nonbinary string and binary string is treated as a comparison of binary strings.

Simple comparison operations (>=, >, =, <, <=, sorting, and grouping) are based on each character's sort value. Characters with the same sort value are treated as the same character. For example, if e and é have the same sort value in a given collation, they compare as equal.

The default character set and collation are latin1 and latin1_swedish_ci, so nonbinary string comparisons are case insensitive by default. This means that if you search with col_name LIKE 'a%', you get all column values that start with A or a. To make this search case-sensitive, make sure that one of the operands has a case-sensitive or binary collation. For example, if you are comparing a column and a string that both have the latin1 character set, you can use the COLLATE operator to cause either operand to have the latin1_general_cs or latin1_bin collation:

col_name COLLATE latin1_general_cs LIKE 'a%'
col_name LIKE 'a%' COLLATE latin1_general_cs
col_name COLLATE latin1_bin LIKE 'a%'
col_name LIKE 'a%' COLLATE latin1_bin

If you want a column always to be treated in case-sensitive fashion, declare it with a case-sensitive or binary collation. See Section 13.1.17, “CREATE TABLE Statement”.

To cause a case-sensitive comparison of nonbinary strings to be case insensitive, use COLLATE to name a case-insensitive collation. The strings in the following example normally are case-sensitive, but COLLATE changes the comparison to be case insensitive:

mysql> SET @s1 = 'MySQL' COLLATE latin1_bin,
    ->     @s2 = 'mysql' COLLATE latin1_bin;
mysql> SELECT @s1 = @s2;
+-----------+
| @s1 = @s2 |
+-----------+
|         0 |
+-----------+
mysql> SELECT @s1 COLLATE latin1_swedish_ci = @s2;
+-------------------------------------+
| @s1 COLLATE latin1_swedish_ci = @s2 |
+-------------------------------------+
|                                   1 |
+-------------------------------------+

A binary string is case-sensitive in comparisons. To compare the string as case insensitive, convert it to a nonbinary string and use COLLATE to name a case-insensitive collation:

mysql> SET @s = BINARY 'MySQL';
mysql> SELECT @s = 'mysql';
+--------------+
| @s = 'mysql' |
+--------------+
|            0 |
+--------------+
mysql> SELECT CONVERT(@s USING latin1) COLLATE latin1_swedish_ci = 'mysql';
+--------------------------------------------------------------+
| CONVERT(@s USING latin1) COLLATE latin1_swedish_ci = 'mysql' |
+--------------------------------------------------------------+
|                                                            1 |
+--------------------------------------------------------------+

To determine whether a value will compare as a nonbinary or binary string, use the COLLATION() function. This example shows that VERSION() returns a string that has a case-insensitive collation, so comparisons are case insensitive:

mysql> SELECT COLLATION(VERSION());
+----------------------+
| COLLATION(VERSION()) |
+----------------------+
| utf8_general_ci      |
+----------------------+

For binary strings, the collation value is binary, so comparisons will be case sensitive. One context in which you will see binary is for compression functions, which return binary strings as a general rule: string:

mysql> SELECT COLLATION(COMPRESS('x'));
+--------------------------+
| COLLATION(COMPRESS('x')) |
+--------------------------+
| binary                   |
+--------------------------+

B.4.4.2 Problems Using DATE Columns

The format of a DATE value is 'YYYY-MM-DD'. According to standard SQL, no other format is permitted. You should use this format in UPDATE expressions and in the WHERE clause of SELECT statements. For example:

SELECT * FROM t1 WHERE date >= '2003-05-05';

As a convenience, MySQL automatically converts a date to a number if the date is used in a numeric context and vice versa. MySQL also permits a relaxed string format when updating and in a WHERE clause that compares a date to a DATE, DATETIME, or TIMESTAMP column. Relaxed format means that any punctuation character may be used as the separator between parts. For example, '2004-08-15' and '2004#08#15' are equivalent. MySQL can also convert a string containing no separators (such as '20040815'), provided it makes sense as a date.

When you compare a DATE, TIME, DATETIME, or TIMESTAMP to a constant string with the <, <=, =, >=, >, or BETWEEN operators, MySQL normally converts the string to an internal long integer for faster comparison (and also for a bit more relaxed string checking). However, this conversion is subject to the following exceptions:

  • When you compare two columns

  • When you compare a DATE, TIME, DATETIME, or TIMESTAMP column to an expression

  • When you use any comparison method other than those just listed, such as IN or STRCMP().

For those exceptions, the comparison is done by converting the objects to strings and performing a string comparison.

To be on the safe side, assume that strings are compared as strings and use the appropriate string functions if you want to compare a temporal value to a string.

The special zero date '0000-00-00' can be stored and retrieved as '0000-00-00'. When a '0000-00-00' date is used through Connector/ODBC, it is automatically converted to NULL because ODBC cannot handle that kind of date.

Because MySQL performs the conversions just described, the following statements work (assume that idate is a DATE column):

INSERT INTO t1 (idate) VALUES (19970505);
INSERT INTO t1 (idate) VALUES ('19970505');
INSERT INTO t1 (idate) VALUES ('97-05-05');
INSERT INTO t1 (idate) VALUES ('1997.05.05');
INSERT INTO t1 (idate) VALUES ('1997 05 05');
INSERT INTO t1 (idate) VALUES ('0000-00-00');

SELECT idate FROM t1 WHERE idate >= '1997-05-05';
SELECT idate FROM t1 WHERE idate >= 19970505;
SELECT MOD(idate,100) FROM t1 WHERE idate >= 19970505;
SELECT idate FROM t1 WHERE idate >= '19970505';

However, the following statement does not work:

SELECT idate FROM t1 WHERE STRCMP(idate,'20030505')=0;

STRCMP() is a string function, so it converts idate to a string in 'YYYY-MM-DD' format and performs a string comparison. It does not convert '20030505' to the date '2003-05-05' and perform a date comparison.

If you enable the ALLOW_INVALID_DATES SQL mode, MySQL permits you to store dates that are given only limited checking: MySQL requires only that the day is in the range from 1 to 31 and the month is in the range from 1 to 12. This makes MySQL very convenient for Web applications where you obtain year, month, and day in three different fields and you want to store exactly what the user inserted (without date validation).

MySQL permits you to store dates where the day or month and day are zero. This is convenient if you want to store a birthdate in a DATE column and you know only part of the date. To disallow zero month or day parts in dates, enable the NO_ZERO_IN_DATE SQL mode.

MySQL permits you to store a zero value of '0000-00-00' as a dummy date. This is in some cases more convenient than using NULL values. If a date to be stored in a DATE column cannot be converted to any reasonable value, MySQL stores '0000-00-00'. To disallow '0000-00-00', enable the NO_ZERO_DATE SQL mode.

To have MySQL check all dates and accept only legal dates (unless overridden by IGNORE), set the sql_mode system variable to "NO_ZERO_IN_DATE,NO_ZERO_DATE".

B.4.4.3 Problems with NULL Values

The concept of the NULL value is a common source of confusion for newcomers to SQL, who often think that NULL is the same thing as an empty string ''. This is not the case. For example, the following statements are completely different:

mysql> INSERT INTO my_table (phone) VALUES (NULL);
mysql> INSERT INTO my_table (phone) VALUES ('');

Both statements insert a value into the phone column, but the first inserts a NULL value and the second inserts an empty string. The meaning of the first can be regarded as phone number is not known and the meaning of the second can be regarded as the person is known to have no phone, and thus no phone number.

To help with NULL handling, you can use the IS NULL and IS NOT NULL operators and the IFNULL() function.

In SQL, the NULL value is never true in comparison to any other value, even NULL. An expression that contains NULL always produces a NULL value unless otherwise indicated in the documentation for the operators and functions involved in the expression. All columns in the following example return NULL:

mysql> SELECT NULL, 1+NULL, CONCAT('Invisible',NULL);

To search for column values that are NULL, you cannot use an expr = NULL test. The following statement returns no rows, because expr = NULL is never true for any expression:

mysql> SELECT * FROM my_table WHERE phone = NULL;

To look for NULL values, you must use the IS NULL test. The following statements show how to find the NULL phone number and the empty phone number:

mysql> SELECT * FROM my_table WHERE phone IS NULL;
mysql> SELECT * FROM my_table WHERE phone = '';

See Section 3.3.4.6, “Working with NULL Values”, for additional information and examples.

You can add an index on a column that can have NULL values if you are using the MyISAM, InnoDB, or MEMORY storage engine. Otherwise, you must declare an indexed column NOT NULL, and you cannot insert NULL into the column.

When reading data with LOAD DATA, empty or missing columns are updated with ''. To load a NULL value into a column, use \N in the data file. The literal word NULL may also be used under some circumstances. See Section 13.2.6, “LOAD DATA Statement”.

When using DISTINCT, GROUP BY, or ORDER BY, all NULL values are regarded as equal.

When using ORDER BY, NULL values are presented first, or last if you specify DESC to sort in descending order.

Aggregate (summary) functions such as COUNT(), MIN(), and SUM() ignore NULL values. The exception to this is COUNT(*), which counts rows and not individual column values. For example, the following statement produces two counts. The first is a count of the number of rows in the table, and the second is a count of the number of non-NULL values in the age column:

mysql> SELECT COUNT(*), COUNT(age) FROM person;

For some data types, MySQL handles NULL values specially. If you insert NULL into a TIMESTAMP column, the current date and time is inserted. If you insert NULL into an integer or floating-point column that has the AUTO_INCREMENT attribute, the next number in the sequence is inserted.

B.4.4.4 Problems with Column Aliases

An alias can be used in a query select list to give a column a different name. You can use the alias in GROUP BY, ORDER BY, or HAVING clauses to refer to the column:

SELECT SQRT(a*b) AS root FROM tbl_name
  GROUP BY root HAVING root > 0;
SELECT id, COUNT(*) AS cnt FROM tbl_name
  GROUP BY id HAVING cnt > 0;
SELECT id AS 'Customer identity' FROM tbl_name;

Standard SQL disallows references to column aliases in a WHERE clause. This restriction is imposed because when the WHERE clause is evaluated, the column value may not yet have been determined. For example, the following query is illegal:

SELECT id, COUNT(*) AS cnt FROM tbl_name
  WHERE cnt > 0 GROUP BY id;

The WHERE clause determines which rows should be included in the GROUP BY clause, but it refers to the alias of a column value that is not known until after the rows have been selected, and grouped by the GROUP BY.

In the select list of a query, a quoted column alias can be specified using identifier or string quoting characters:

SELECT 1 AS `one`, 2 AS 'two';

Elsewhere in the statement, quoted references to the alias must use identifier quoting or the reference is treated as a string literal. For example, this statement groups by the values in column id, referenced using the alias `a`:

SELECT id AS 'a', COUNT(*) AS cnt FROM tbl_name
  GROUP BY `a`;

But this statement groups by the literal string 'a' and will not work as expected:

SELECT id AS 'a', COUNT(*) AS cnt FROM tbl_name
  GROUP BY 'a';

B.4.4.5 Rollback Failure for Nontransactional Tables

If you receive the following message when trying to perform a ROLLBACK, it means that one or more of the tables you used in the transaction do not support transactions:

Warning: Some non-transactional changed tables couldn't be rolled back

These nontransactional tables are not affected by the ROLLBACK statement.

If you were not deliberately mixing transactional and nontransactional tables within the transaction, the most likely cause for this message is that a table you thought was transactional actually is not. This can happen if you try to create a table using a transactional storage engine that is not supported by your mysqld server (or that was disabled with a startup option). If mysqld does not support a storage engine, it instead creates the table as a MyISAM table, which is nontransactional.

You can check the storage engine for a table by using either of these statements:

SHOW TABLE STATUS LIKE 'tbl_name';
SHOW CREATE TABLE tbl_name;

See Section 13.7.5.37, “SHOW TABLE STATUS Statement”, and Section 13.7.5.12, “SHOW CREATE TABLE Statement”.

You can check which storage engines your mysqld server supports by using this statement:

SHOW ENGINES;

You can also use the following statement, and check the value of the variable that is associated with the storage engine in which you are interested:

SHOW VARIABLES LIKE 'have_%';

For example, to determine whether the InnoDB storage engine is available, check the value of the have_innodb variable.

See Section 13.7.5.17, “SHOW ENGINES Statement”, and Section 13.7.5.40, “SHOW VARIABLES Statement”.

B.4.4.6 Deleting Rows from Related Tables

If the total length of the DELETE statement for related_table is more than 1MB (the default value of the max_allowed_packet system variable), you should split it into smaller parts and execute multiple DELETE statements. You probably get the fastest DELETE by specifying only 100 to 1,000 related_column values per statement if the related_column is indexed. If the related_column isn't indexed, the speed is independent of the number of arguments in the IN clause.

B.4.4.7 Solving Problems with No Matching Rows

If you have a complicated query that uses many tables but that returns no rows, you should use the following procedure to find out what is wrong:

  1. Test the query with EXPLAIN to check whether you can find something that is obviously wrong. See Section 13.8.2, “EXPLAIN Statement”.

  2. Select only those columns that are used in the WHERE clause.

  3. Remove one table at a time from the query until it returns some rows. If the tables are large, it is a good idea to use LIMIT 10 with the query.

  4. Issue a SELECT for the column that should have matched a row against the table that was last removed from the query.

  5. If you are comparing FLOAT or DOUBLE columns with numbers that have decimals, you cannot use equality (=) comparisons. This problem is common in most computer languages because not all floating-point values can be stored with exact precision. In some cases, changing the FLOAT to a DOUBLE fixes this. See Section B.4.4.8, “Problems with Floating-Point Values”.

  6. If you still cannot figure out what is wrong, create a minimal test that can be run with mysql test < query.sql that shows your problems. You can create a test file by dumping the tables with mysqldump --quick db_name tbl_name_1 ... tbl_name_n > query.sql. Open the file in an editor, remove some insert lines (if there are more than needed to demonstrate the problem), and add your SELECT statement at the end of the file.

    Verify that the test file demonstrates the problem by executing these commands:

    shell> mysqladmin create test2
    shell> mysql test2 < query.sql
    

    Attach the test file to a bug report, which you can file using the instructions in Section 1.6, “How to Report Bugs or Problems”.

B.4.4.8 Problems with Floating-Point Values

Floating-point numbers sometimes cause confusion because they are approximate and not stored as exact values. A floating-point value as written in an SQL statement may not be the same as the value represented internally. Attempts to treat floating-point values as exact in comparisons may lead to problems. They are also subject to platform or implementation dependencies. The FLOAT and DOUBLE data types are subject to these issues. For DECIMAL columns, MySQL performs operations with a precision of 65 decimal digits, which should solve most common inaccuracy problems.

The following example uses DOUBLE to demonstrate how calculations that are done using floating-point operations are subject to floating-point error.

mysql> CREATE TABLE t1 (i INT, d1 DOUBLE, d2 DOUBLE);
mysql> INSERT INTO t1 VALUES (1, 101.40, 21.40), (1, -80.00, 0.00),
    -> (2, 0.00, 0.00), (2, -13.20, 0.00), (2, 59.60, 46.40),
    -> (2, 30.40, 30.40), (3, 37.00, 7.40), (3, -29.60, 0.00),
    -> (4, 60.00, 15.40), (4, -10.60, 0.00), (4, -34.00, 0.00),
    -> (5, 33.00, 0.00), (5, -25.80, 0.00), (5, 0.00, 7.20),
    -> (6, 0.00, 0.00), (6, -51.40, 0.00);

mysql> SELECT i, SUM(d1) AS a, SUM(d2) AS b
    -> FROM t1 GROUP BY i HAVING a <> b;

+------+-------+------+
| i    | a     | b    |
+------+-------+------+
|    1 |  21.4 | 21.4 |
|    2 |  76.8 | 76.8 |
|    3 |   7.4 |  7.4 |
|    4 |  15.4 | 15.4 |
|    5 |   7.2 |  7.2 |
|    6 | -51.4 |    0 |
+------+-------+------+

The result is correct. Although the first five records look like they should not satisfy the comparison (the values of a and b do not appear to be different), they may do so because the difference between the numbers shows up around the tenth decimal or so, depending on factors such as computer architecture or the compiler version or optimization level. For example, different CPUs may evaluate floating-point numbers differently.

If columns d1 and d2 had been defined as DECIMAL rather than DOUBLE, the result of the SELECT query would have contained only one row—the last one shown above.

The correct way to do floating-point number comparison is to first decide on an acceptable tolerance for differences between the numbers and then do the comparison against the tolerance value. For example, if we agree that floating-point numbers should be regarded the same if they are same within a precision of one in ten thousand (0.0001), the comparison should be written to find differences larger than the tolerance value:

mysql> SELECT i, SUM(d1) AS a, SUM(d2) AS b FROM t1
    -> GROUP BY i HAVING ABS(a - b) > 0.0001;
+------+-------+------+
| i    | a     | b    |
+------+-------+------+
|    6 | -51.4 |    0 |
+------+-------+------+
1 row in set (0.00 sec)

Conversely, to get rows where the numbers are the same, the test should find differences within the tolerance value:

mysql> SELECT i, SUM(d1) AS a, SUM(d2) AS b FROM t1
    -> GROUP BY i HAVING ABS(a - b) <= 0.0001;
+------+------+------+
| i    | a    | b    |
+------+------+------+
|    1 | 21.4 | 21.4 |
|    2 | 76.8 | 76.8 |
|    3 |  7.4 |  7.4 |
|    4 | 15.4 | 15.4 |
|    5 |  7.2 |  7.2 |
+------+------+------+
5 rows in set (0.03 sec)

Floating-point values are subject to platform or implementation dependencies. Suppose that you execute the following statements:

CREATE TABLE t1(c1 FLOAT(53,0), c2 FLOAT(53,0));
INSERT INTO t1 VALUES('1e+52','-1e+52');
SELECT * FROM t1;

On some platforms, the SELECT statement returns inf and -inf. On others, it returns 0 and -0.

An implication of the preceding issues is that if you attempt to create a replication slave by dumping table contents with mysqldump on the master and reloading the dump file into the slave, tables containing floating-point columns might differ between the two hosts.

B.4.5 Optimizer-Related Issues

MySQL uses a cost-based optimizer to determine the best way to resolve a query. In many cases, MySQL can calculate the best possible query plan, but sometimes MySQL does not have enough information about the data at hand and has to make educated guesses about the data.

For the cases when MySQL does not do the "right" thing, tools that you have available to help MySQL are:

B.4.6 Table Definition-Related Issues

B.4.6.1 Problems with ALTER TABLE

If you get a duplicate-key error when using ALTER TABLE to change the character set or collation of a character column, the cause is either that the new column collation maps two keys to the same value or that the table is corrupted. In the latter case, you should run REPAIR TABLE on the table. REPAIR TABLE works for MyISAM, ARCHIVE, and CSV tables.

If ALTER TABLE dies with the following error, the problem may be that MySQL crashed during an earlier ALTER TABLE operation and there is an old table named A-xxx or B-xxx lying around:

Error on rename of './database/name.frm'
to './database/B-xxx.frm' (Errcode: 17)

In this case, go to the MySQL data directory and delete all files that have names starting with A- or B-. (You may want to move them elsewhere instead of deleting them.)

ALTER TABLE works in the following way:

  • Create a new table named A-xxx with the requested structural changes.

  • Copy all rows from the original table to A-xxx.

  • Rename the original table to B-xxx.

  • Rename A-xxx to your original table name.

  • Delete B-xxx.

If something goes wrong with the renaming operation, MySQL tries to undo the changes. If something goes seriously wrong (although this shouldn't happen), MySQL may leave the old table as B-xxx. A simple rename of the table files at the system level should get your data back.

If you use ALTER TABLE on a transactional table or if you are using Windows, ALTER TABLE unlocks the table if you had done a LOCK TABLE on it. This is done because InnoDB and these operating systems cannot drop a table that is in use.

B.4.6.2 TEMPORARY Table Problems

Temporary tables created with CREATE TEMPORARY TABLE have the following limitations:

  • TEMPORARY tables are supported only by the InnoDB, MEMORY, MyISAM, and MERGE storage engines.

  • Temporary tables are not supported for NDB Cluster.

  • The SHOW TABLES statement does not list TEMPORARY tables.

  • To rename TEMPORARY tables, RENAME TABLE does not work. Use ALTER TABLE instead:

    ALTER TABLE old_name RENAME new_name;
    
  • You cannot refer to a TEMPORARY table more than once in the same query. For example, the following does not work:

    SELECT * FROM temp_table JOIN temp_table AS t2;
    

    The statement produces this error:

    ERROR 1137: Can't reopen table: 'temp_table'
    
  • The Can't reopen table error also occurs if you refer to a temporary table multiple times in a stored function under different aliases, even if the references occur in different statements within the function.

  • If a TEMPORARY is created with the same name as an existing non-TEMPORARY table, the non-TEMPORARY table is hidden until the TEMPORARY table is dropped, even if the tables use different storage engines.

  • There are known issues in using temporary tables with replication. See Section 17.4.1.30, “Replication and Temporary Tables”, for more information.

B.4.7 Known Issues in MySQL

This section lists known issues in recent versions of MySQL.

For information about platform-specific issues, see the installation and porting instructions in Section 2.1, “General Installation Guidance”, and Section 24.5, “Debugging and Porting MySQL”.

The following problems are known:

  • Subquery optimization for IN is not as effective as for =.

  • Even if you use lower_case_table_names=2 (which enables MySQL to remember the case used for databases and table names), MySQL does not remember the case used for database names for the function DATABASE() or within the various logs (on case-insensitive systems).

  • Dropping a FOREIGN KEY constraint does not work in replication because the constraint may have another name on the slave.

  • REPLACE (and LOAD DATA with the REPLACE option) does not trigger ON DELETE CASCADE.

  • DISTINCT with ORDER BY does not work inside GROUP_CONCAT() if you do not use all and only those columns that are in the DISTINCT list.

  • When inserting a big integer value (between 263 and 264−1) into a decimal or string column, it is inserted as a negative value because the number is evaluated in a signed integer context.

  • ANALYZE TABLE, OPTIMIZE TABLE, and REPAIR TABLE may cause problems on tables for which you are using INSERT DELAYED.

  • With statement-based binary logging, the master writes the executed queries to the binary log. This is a very fast, compact, and efficient logging method that works perfectly in most cases. However, it is possible for the data on the master and slave to become different if a query is designed in such a way that the data modification is nondeterministic (generally not a recommended practice, even outside of replication).

    For example:

    • CREATE TABLE ... SELECT or INSERT ... SELECT statements that insert zero or NULL values into an AUTO_INCREMENT column.

    • DELETE if you are deleting rows from a table that has foreign keys with ON DELETE CASCADE properties.

    • REPLACE ... SELECT, INSERT IGNORE ... SELECT if you have duplicate key values in the inserted data.

    If and only if the preceding queries have no ORDER BY clause guaranteeing a deterministic order.

    For example, for INSERT ... SELECT with no ORDER BY, the SELECT may return rows in a different order (which results in a row having different ranks, hence getting a different number in the AUTO_INCREMENT column), depending on the choices made by the optimizers on the master and slave.

    A query is optimized differently on the master and slave only if:

    • The table is stored using a different storage engine on the master than on the slave. (It is possible to use different storage engines on the master and slave. For example, you can use InnoDB on the master, but MyISAM on the slave if the slave has less available disk space.)

    • MySQL buffer sizes (key_buffer_size, and so on) are different on the master and slave.

    • The master and slave run different MySQL versions, and the optimizer code differs between these versions.

    This problem may also affect database restoration using mysqlbinlog|mysql.

    The easiest way to avoid this problem is to add an ORDER BY clause to the aforementioned nondeterministic queries to ensure that the rows are always stored or modified in the same order. Using row-based or mixed logging format also avoids the problem.

  • Log file names are based on the server host name if you do not specify a file name with the startup option. To retain the same log file names if you change your host name to something else, you must explicitly use options such as --log-bin=old_host_name-bin. See Section 5.1.6, “Server Command Options”. Alternatively, rename the old files to reflect your host name change. If these are binary logs, you must edit the binary log index file and fix the binary log file names there as well. (The same is true for the relay logs on a slave server.)

  • mysqlbinlog does not delete temporary files left after a LOAD DATA statement. See Section 4.6.7, “mysqlbinlog — Utility for Processing Binary Log Files”.

  • RENAME does not work with TEMPORARY tables or tables used in a MERGE table.

  • When using SET CHARACTER SET, you cannot use translated characters in database, table, and column names.

  • You cannot use _ or % with ESCAPE in LIKE ... ESCAPE.

  • The server uses only the first max_sort_length bytes when comparing data values. This means that values cannot reliably be used in GROUP BY, ORDER BY, or DISTINCT if they differ only after the first max_sort_length bytes. To work around this, increase the variable value. The default value of max_sort_length is 1024 and can be changed at server startup time or at runtime.

  • Numeric calculations are done with BIGINT or DOUBLE (both are normally 64 bits long). Which precision you get depends on the function. The general rule is that bit functions are performed with BIGINT precision, IF() and ELT() with BIGINT or DOUBLE precision, and the rest with DOUBLE precision. You should try to avoid using unsigned long long values if they resolve to be larger than 63 bits (9223372036854775807) for anything other than bit fields.

  • You can have up to 255 ENUM and SET columns in one table.

  • In MIN(), MAX(), and other aggregate functions, MySQL currently compares ENUM and SET columns by their string value rather than by the string's relative position in the set.

  • In an UPDATE statement, columns are updated from left to right. If you refer to an updated column, you get the updated value instead of the original value. For example, the following statement increments KEY by 2, not 1:

    mysql> UPDATE tbl_name SET KEY=KEY+1,KEY=KEY+1;
    
  • You can refer to multiple temporary tables in the same query, but you cannot refer to any given temporary table more than once. For example, the following does not work:

    mysql> SELECT * FROM temp_table, temp_table AS t2;
    ERROR 1137: Can't reopen table: 'temp_table'
    
  • The optimizer may handle DISTINCT differently when you are using hidden columns in a join than when you are not. In a join, hidden columns are counted as part of the result (even if they are not shown), whereas in normal queries, hidden columns do not participate in the DISTINCT comparison.

    An example of this is:

    SELECT DISTINCT mp3id FROM band_downloads
           WHERE userid = 9 ORDER BY id DESC;
    

    and

    SELECT DISTINCT band_downloads.mp3id
           FROM band_downloads,band_mp3
           WHERE band_downloads.userid = 9
           AND band_mp3.id = band_downloads.mp3id
           ORDER BY band_downloads.id DESC;
    

    In the second case, you may get two identical rows in the result set (because the values in the hidden id column may differ).

    Note that this happens only for queries that do not have the ORDER BY columns in the result.

  • If you execute a PROCEDURE on a query that returns an empty set, in some cases the PROCEDURE does not transform the columns.

  • Creation of a table of type MERGE does not check whether the underlying tables are compatible types.

  • If you use ALTER TABLE to add a UNIQUE index to a table used in a MERGE table and then add a normal index on the MERGE table, the key order is different for the tables if there was an old, non-UNIQUE key in the table. This is because ALTER TABLE puts UNIQUE indexes before normal indexes to be able to detect duplicate keys as early as possible.