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:
2018-10-28T13:01:32.735983Z 0 [Note] [MY-010303] [Server] Skipping
generation of SSL certificates as options related to SSL are specified.
2018-10-02T03:20:39.410387Z 768 [ERROR] [MY-010045] [Server] Event Scheduler:
[evtuser@localhost][myschema.e_daily] Unknown database 'mydb'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 existEach server error message includes an error code, SQLSTATE value, and message string, as described in Error Message Sources and Elements. These elements are available as described in 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 Chapter 4, Global Error Message Reference
Error number:
1002; Symbol:ER_NO; SQLSTATE:HY000Message: NO
Used in the construction of other messages.
Error number:
1003; Symbol:ER_YES; SQLSTATE:HY000Message: YES
Used in the construction of other messages.
Extended
EXPLAINformat generates Note messages.ER_YESis used in theCodecolumn for these messages in subsequentSHOW WARNINGSoutput.Error number:
1004; Symbol:ER_CANT_CREATE_FILE; SQLSTATE:HY000Message: Can't create file '%s' (errno: %d - %s)
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:HY000Message: Can't create table '%s' (errno: %d - %s)
InnoDBreports 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 internalInnoDBtable.Error number:
1006; Symbol:ER_CANT_CREATE_DB; SQLSTATE:HY000Message: Can't create database '%s' (errno: %d - %s)
Error number:
1007; Symbol:ER_DB_CREATE_EXISTS; SQLSTATE:HY000Message: 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 EXISTSclause to theCREATE DATABASEstatement if to retain an existing database without having the statement produce an error.Error number:
1008; Symbol:ER_DB_DROP_EXISTS; SQLSTATE:HY000Message: Can't drop database '%s'; database doesn't exist
Error number:
1010; Symbol:ER_DB_DROP_RMDIR; SQLSTATE:HY000Message: Error dropping database (can't rmdir '%s', errno: %d - %s)
Error number:
1012; Symbol:ER_CANT_FIND_SYSTEM_REC; SQLSTATE:HY000Message: Can't read record in system table
Returned by
InnoDBfor attempts to accessInnoDBINFORMATION_SCHEMAtables whenInnoDBis unavailable.Error number:
1013; Symbol:ER_CANT_GET_STAT; SQLSTATE:HY000Message: Can't get status of '%s' (errno: %d - %s)
Error number:
1015; Symbol:ER_CANT_LOCK; SQLSTATE:HY000Message: Can't lock file (errno: %d - %s)




