mysql错误码

Mysql错误代码
Mysql错误代码分为两部分,老版本一部分,4.1版本为新的部分

第一部分:
mysql的出错代码表,根据mysql的头文件mysql/include/mysqld_error.h整理而成

1005:创建表失败
1006:创建数据库失败
1007:数据库已存在,创建数据库失败
1008:数据库不存在,删除数据库失败
1009:不能删除数据库文件导致删除数据库失败
1010:不能删除数据目录导致删除数据库失败
1011:删除数据库文件失败
1012:不能读取系统表中的记录
1016:文件无法打开,使用后台修复或者使用phpmyadmin进行修复。
1020:记录已被其他用户修改
1021:硬盘剩余空间不足,请加大硬盘可用空间
1022:关键字重复,更改记录失败
1023:关闭时发生错误
1024:读文件错误
1025:更改名字时发生错误
1026:写文件错误
1032:记录不存在
1036:数据表是只读的,不能对它进行修改
1037:系统内存不足,请重启数据库或重启服务器
1038:用于排序的内存不足,请增大排序缓冲区
1040:已到达数据库的最大连接数,请加大数据库可用连接数
1041:系统内存不足
1042:无效的主机名
1043:无效连接
1044:当前用户没有访问数据库的权限
1045:不能连接数据库,用户名或密码错误
1048:字段不能为空
1049:数据库不存在
1050:数据表已存在
1051:数据表不存在
1054:字段不存在
1065:无效的SQL语句,SQL语句为空
1081:不能建立Socket连接
1114:数据表已满,不能容纳任何记录
1116:打开的数据表太多
1129:数据库出现异常,请重启数据库
1130:连接数据库失败,没有连接数据库的权限
1133:数据库用户不存在
1141:当前用户无权访问数据库
1142:当前用户无权访问数据表
1143:当前用户无权访问数据表中的字段
1146:数据表不存在
1147:未定义用户对数据表的访问权限
1149:SQL语句语法错误
1158:网络错误,出现读错误,请检查网络连接状况
1159:网络错误,读超时,请检查网络连接状况
1160:网络错误,出现写错误,请检查网络连接状况
1161:网络错误,写超时,请检查网络连接状况
1062:字段值重复,入库失败
1169:字段值重复,更新记录失败
1177:打开数据表失败
1180:提交事务失败
1181:回滚事务失败
1203:当前用户和数据库建立的连接已到达数据库的最大连接数,请增大可用的数据库连接数或重启数据库
1205:加锁超时
1211:当前用户没有创建用户的权限
1216:外键约束检查失败,更新子表记录失败
1217:外键约束检查失败,删除或修改主表记录失败
1226:当前用户使用的资源已超过所允许的资源,请重启数据库或重启服务器
1227:权限不足,您无权进行此操作
1235:MySQL版本过低,不具有本功能

 

第二部分 新4.1.11,摘自DOCSmysqld_error.txt

character-set=utf-8 isher补充


#define ER_HASHCHK 1000
"hashchk",

#define ER_NISAMCHK 1001
"isamchk",

#define ER_NO 1002
"NO",

#define ER_YES 1003
"YES",

#define ER_CANT_CREATE_FILE 1004
"Can't create file '%-.64s' (errno: %d)",

#define ER_CANT_CREATE_TABLE 1005
"Can't create table '%-.64s' (errno: %d)",

#define ER_CANT_CREATE_DB 1006
"Can't create database '%-.64s' (errno: %d)",

#define ER_DB_CREATE_EXISTS 1007
"Can't create database '%-.64s'; database exists",

#define ER_DB_DROP_EXISTS 1008
"Can't drop database '%-.64s'; database doesn't exist",

#define ER_DB_DROP_DELETE 1009
"Error dropping database (can't delete '%-.64s', errno: %d)",

#define ER_DB_DROP_RMDIR 1010
"Error dropping database (can't rmdir '%-.64s', errno: %d)",

#define ER_CANT_DELETE_FILE 1011
"Error on delete of '%-.64s' (errno: %d)",

#define ER_CANT_FIND_SYSTEM_REC 1012
"Can't read record in system table",

#define ER_CANT_GET_STAT 1013
"Can't get status of '%-.64s' (errno: %d)",

#define ER_CANT_GET_WD 1014
"Can't get working directory (errno: %d)",

#define ER_CANT_LOCK 1015
"Can't lock file (errno: %d)",

#define ER_CANT_OPEN_FILE 1016
"Can't open file: '%-.64s' (errno: %d)",

#define ER_FILE_NOT_FOUND 1017
"Can't find file: '%-.64s' (errno: %d)",

#define ER_CANT_READ_DIR 1018
"Can't read dir of '%-.64s' (errno: %d)",

#define ER_CANT_SET_WD 1019
"Can't change dir to '%-.64s' (errno: %d)",

#define ER_CHECKREAD 1020
"Record has changed since last read in table '%-.64s'",

#define ER_DISK_FULL 1021
"Disk full (%s). Waiting for someone to free some space...",

#define ER_DUP_KEY 1022
"Can't write, duplicate key in table '%-.64s'",

#define ER_ERROR_ON_CLOSE 1023
"Error on close of '%-.64s' (errno: %d)",

#define ER_ERROR_ON_READ 1024
"Error reading file '%-.64s' (errno: %d)",

#define ER_ERROR_ON_RENAME 1025
"Error on rename of '%-.64s' to '%-.64s' (errno: %d)",

#define ER_ERROR_ON_WRITE 1026
"Error writing file '%-.64s' (errno: %d)",

#define ER_FILE_USED 1027
"'%-.64s' is locked against change",

#define ER_FILSORT_ABORT 1028
"So瘀牡?剕 ????o鸞? rt aborted",

#define ER_FORM_NOT_FOUND 1029
"View '%-.64s' doesn't exist for '%-.64s'",

#define ER_GET_ERRNO 1030
"Got error %d from storage engine",

#define ER_ILLEGAL_HA 1031
"Table storage engine for '%-.64s' doesn't have this option",

#define ER_KEY_NOT_FOUND 1032
"Can't find record in '%-.64s'",

#define ER_NOT_FORM_FILE 1033
"Incorrect information in file: '%-.64s'",

#define ER_NOT_KEYFILE 1034
"Incorrect key file for table: '%-.64s'; try to repair it",

#define ER_OLD_KEYFILE 1035
"Old key file for table '%-.64s'; repair it!",

#define ER_OPEN_AS_READONLY 1036
"Table '%-.64s' is read only",

#define ER_OUTOFMEMORY 1037
"Out of memory. Restart daemon and try again (needed %d bytes)",

#define ER_OUT_OF_SORTMEMORY 1038
"Out of sort memory. Increase daemon sort buffer size",

#define ER_UNEXPECTED_EOF 1039
"Unexpected eof found when reading file '%-.64s' (errno: %d)",

#define ER_CON_COUNT_ERROR 1040
"Too many connections",

#define ER_OUT_OF_RESOURCES 1041
"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",

#define ER_BAD_HOST_ERROR 1042
"Can't get hostname for your address",

#define ER_HANDSHAKE_ERROR 1043
"Bad handshake",

#define ER_DBACCESS_DENIED_ERROR 1044
"Access denied for user: '%-.32s'@'%-.64s' to database '%-.64s'",

#define ER_ACCESS_DENIED_ERROR 1045
"Access denied for user: '%-.32s'@'%-.64s' (Using password: %s)",

#define ER_NO_DB_ERROR 1046
"No Database Selected",

#define ER_UNKNOWN_COM_ERROR 1047
"Unknown command",

#define ER_BAD_NULL_ERROR 1048
"Co

  • 2
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值