MySQL / MariaDB Server Error Codes
Numeric error codes returned by the MySQL and MariaDB server. Clients receive these via the error packet alongside a SQLSTATE value and message string.
References
82 codes
-
1005Cannot create table -
1007Database already exists -
1008Database does not exist -
1021Disk full -
1030Storage engine error -
1036Table is read only -
1040Too many connections -
1044Access denied for user to database -
1045Access denied for user -
1048Column cannot be null -
1049Unknown database -
1050Table already exists -
1051Unknown table -
1052Ambiguous column -
1054Unknown column -
1060Duplicate column name -
1062Duplicate entry -
1064Syntax error -
1065Query was empty -
1066Not unique table or alias -
1067Invalid default value -
1068Multiple primary key defined -
1075Incorrect auto column definition -
1091Column or key does not exist -
1100Table locked with read lock -
1101BLOB or TEXT cannot have a default value -
1104SELECT would examine too many rows -
1111Invalid use of group function -
1113Table must have at least one column -
1114Table is full -
1129Host blocked due to many connection errors -
1130Host not allowed to connect -
1136Column count does not match value count -
1146Table doesn't exist -
1148Command not allowed -
1153Packet bigger than max_allowed_packet -
1166Incorrect column name -
1169Unique constraint violation on write -
1171PRIMARY KEY must be NOT NULL -
1172Result contains more than one row -
1175Safe update mode -
1193Unknown system variable -
1194Table is marked as crashed -
1195Table repair failed -
1200Replica already running -
1203Too many user connections -
1205Lock wait timeout exceeded -
1206Total locks exceeds lock table size -
1213Deadlock found -
1215Cannot add foreign key constraint -
1216Foreign key constraint fails on child insert or update -
1217Foreign key constraint fails on parent delete or update -
1222UNION columns do not match -
1223Conflicting read lock -
1226Max queries per hour exceeded -
1231Variable cannot be set to NULL -
1235Feature not supported in this version -
1236Fatal replication error reading binary log -
1241Operand must contain one column -
1242Subquery returns more than one row -
1248Every derived table must have its own alias -
1251Client does not support authentication protocol -
1264Out of range value for column -
1267Illegal mix of collations -
1286Unknown storage engine -
1292Incorrect value -
1298Unknown or incorrect time zone -
1304Procedure already exists -
1305Procedure does not exist -
1318Wrong number of arguments for procedure -
1320No RETURN found in function -
1364Field has no default value -
1366Incorrect integer value -
1390Too many placeholders in prepared statement -
1406Data too long for column -
1415Trigger cannot return result set -
1418Function lacks determinism declaration -
1419Requires SUPER privilege for binary logging -
1442Cannot update table in stored function or trigger -
1451Foreign key constraint fails on parent delete -
1452Foreign key constraint fails on child insert -
1461Too many prepared statements