MySQL 错误代码
- 1045Access denied for user (using password: YES/NO)(用户访问被拒绝(使用密码:YES/NO))
- 1062Duplicate entry for key(键的重复条目)
- 1213Deadlock found when trying to get lock; try restarting transaction(尝试获取锁时发现死锁;请尝试重新开始事务)
- 1205Lock wait timeout exceeded; try restarting transaction(超出锁等待超时;请尝试重新开始事务)
- 1040Too many connections(连接过多)
- 1064You have an error in your SQL syntax(SQL 语法错误)
- 1146Table doesn't exist(表不存在)
- 1054Unknown column in field list(字段列表中存在未知列)
- 2002Can't connect to local MySQL server through socket(无法通过 socket 连接到本地 MySQL 服务器)
- 2003Can't connect to MySQL server (TCP/IP)(无法连接到 MySQL 服务器(TCP/IP))
- 2006MySQL server has gone away(MySQL 服务器已断开)
- 1114The table is full(表已满)
- 1215Cannot add foreign key constraint(无法添加外键约束)
- 1451Cannot delete or update a parent row: a foreign key constraint fails(无法删除或更新父行:外键约束失败)
- 1452Cannot add or update a child row: a foreign key constraint fails(无法添加或更新子行:外键约束失败)
- 1366Incorrect string/integer value for column(列的字符串/整数值不正确)
- 1044Access denied for user to database(用户对数据库的访问被拒绝)
- 1264Out of range value for column(列的值超出范围)
- 1052Column 'x' in field list is ambiguous(字段列表中的列 'x' 不明确)
- 1136Column count doesn't match value count(列数与值数不匹配)
- 1048Column 'x' cannot be null(列 'x' 不能为 null)
- 1292Incorrect datetime value / truncated incorrect value(日期时间值不正确 / 截断了不正确的值)
- 1406Data too long for column(列的数据过长)
- 1071Specified key was too long; max key length is 767 bytes(指定的键过长;最大键长度为 767 字节)
- 1050Table already exists(表已存在)
- 1051Unknown table 'x'(未知表 'x')
- 1091Can't DROP 'x'; check that column/key exists(无法 DROP 'x';请检查该列/键是否存在)
- 1093You can't specify target table 'x' for update in FROM clause(不能在 FROM 子句中指定要更新的目标表 'x')
- 1305PROCEDURE does not exist(PROCEDURE 不存在)
- 1227Access denied; you need (at least one of) the PRIVILEGE(访问被拒绝;需要(至少一项)PRIVILEGE 权限)
- 3730Cannot drop table referenced by a foreign key constraint(无法删除被外键约束引用的表)
- 2013Lost connection to MySQL server during query(查询期间与 MySQL 服务器的连接丢失)
- 1153Got a packet bigger than 'max_allowed_packet' bytes(收到的数据包大于 'max_allowed_packet' 字节)
- 1969MariaDB: Query execution was interrupted (max_statement_time exceeded)(MariaDB:查询执行被中断(超出 max_statement_time))
- 1927MariaDB: ER_CONNECTION_KILLED: Connection was killed(连接已被终止)
- 1290ER_OPTION_PREVENTS_STATEMENT: running with the --read-only option(以 --read-only 选项运行)
- 1836ER_READ_ONLY_MODE: Running in read-only mode(以只读模式运行)
- 3819ER_CHECK_CONSTRAINT_VIOLATED: Check constraint is violated(违反 CHECK 约束)
- 1118ER_TOO_BIG_ROWSIZE: Row size too large(行大小过大)
- 1170ER_BLOB_KEY_WITHOUT_LENGTH: BLOB/TEXT column used in key specification without a key length(在键定义中使用 BLOB/TEXT 列但未指定键长度)
- 1592ER_BINLOG_UNSAFE_STATEMENT: Unsafe statement written to the binary log(不安全的语句被写入二进制日志)
- 3140ER_INVALID_JSON_TEXT: Invalid JSON text(无效的 JSON 文本)
- 1526ER_NO_PARTITION_FOR_GIVEN_VALUE: Table has no partition for value(表中没有对应该值的分区)
- 1049Unknown database 'name'(未知数据库 'name')
- 1364Field 'name' doesn't have a default value(字段 'name' 没有默认值)
- 1206The total number of locks exceeds the lock table size(锁的总数超过了锁表大小)
- 1236Got fatal error 1236 from master when reading data from binary log(从 master 读取二进制日志数据时收到致命错误 1236)
- 1129Host 'host' is blocked because of many connection errors(主机 'host' 因连接错误过多而被阻止)
- 1194Table 'name' is marked as crashed and should be repaired(表 'name' 被标记为已崩溃,应当修复)
- 1615Prepared statement needs to be re-prepared(预处理语句需要重新准备)
- 1553Cannot drop index needed in a foreign key constraint(无法删除外键约束所需的索引)
- 3948Loading local data is disabled; this must be enabled on both the client and server sides(加载本地数据已禁用;必须在客户端和服务器端同时启用)
- 1075Incorrect table definition; there can be only one auto column and it must be defined as a key(表定义不正确;只能有一个自增列,且必须将其定义为键)
- 1055Expression not in GROUP BY (only_full_group_by)(表达式不在 GROUP BY 中)
- 1267Illegal mix of collations(非法的排序规则混用)
- 1030Got error N from storage engine(从存储引擎收到错误 N)
- 1197Multi-statement transaction required more than 'max_binlog_cache_size'(多语句事务所需空间超过了 'max_binlog_cache_size')
- 1785Statement violates GTID consistency(语句违反 GTID 一致性)
- 3024Query execution was interrupted, maximum statement execution time exceeded(查询执行被中断,超出最大语句执行时间)
- 1298Unknown or incorrect time zone(未知或不正确的时区)
- 1418Function has none of DETERMINISTIC, NO SQL, or READS SQL DATA (binary logging enabled)(函数未声明 DETERMINISTIC、NO SQL 或 READS SQL DATA 中的任何一项)
- 1231Variable can't be set to the value of ...(变量不能设置为 ... 的值)