mysql错误编号和jdbc对应的sql编号对应一览

Mapping MySQL Error Numbers to JDBC SQLState Codes


MySQL Error Number
MySQL Error Name Legacy (X/Open) SQLState SQL Standard SQLState
1022 ER_DUP_KEY S1000 23000
1037 ER_OUTOFMEMORY S1001 HY001
1038 ER_OUT_OF_SORTMEMORY S1001 HY001
1040 ER_CON_COUNT_ERROR 8004 8004
1042 ER_BAD_HOST_ERROR 8004 08S01
1043 ER_HANDSHAKE_ERROR 8004 08S01
1044 ER_DBACCESS_DENIED_ERROR S1000 42000
1045 ER_ACCESS_DENIED_ERROR 28000 28000
1047 ER_UNKNOWN_COM_ERROR 08S01 HY000
1050 ER_TABLE_EXISTS_ERROR S1000 42S01
1051 ER_BAD_TABLE_ERROR 42S02 42S02
1052 ER_NON_UNIQ_ERROR S1000 23000
1053 ER_SERVER_SHUTDOWN S1000 08S01
1054 ER_BAD_FIELD_ERROR S0022 42S22
1055 ER_WRONG_FIELD_WITH_GROUP S1009 42000
1056 ER_WRONG_GROUP_FIELD S1009 42000
1057 ER_WRONG_SUM_SELECT S1009 42000
1058 ER_WRONG_VALUE_COUNT 21S01 21S01
1059 ER_TOO_LONG_IDENT S1009 42000
1060 ER_DUP_FIELDNAME S1009 42S21
1061 ER_DUP_KEYNAME S1009 42000
1062 ER_DUP_ENTRY S1009 23000
1063 ER_WRONG_FIELD_SPEC S1009 42000
1064 ER_PARSE_ERROR 42000 42000
1065 ER_EMPTY_QUERY 42000 42000
1066 ER_NONUNIQ_TABLE S1009 42000
1067 ER_INVALID_DEFAULT S1009 42000
1068 ER_MULTIPLE_PRI_KEY S1009 42000
1069 ER_TOO_MANY_KEYS S1009 42000
1070 ER_TOO_MANY_KEY_PARTS S1009 42000
1071 ER_TOO_LONG_KEY S1009 42000
1072 ER_KEY_COLUMN_DOES_NOT_EXITS S1009 42000
1073 ER_BLOB_USED_AS_KEY S1009 42000
1074 ER_TOO_BIG_FIELDLENGTH S1009 42000
1075 ER_WRONG_AUTO_KEY S1009 42000
1080 ER_FORCING_CLOSE S1000 08S01
1081 ER_IPSOCK_ERROR 08S01 08S01
1082 ER_NO_SUCH_INDEX S1009 42S12
1083 ER_WRONG_FIELD_TERMINATORS S1009 42000
1084 ER_BLOBS_AND_NO_TERMINATED S1009 42000
1090 ER_CANT_REMOVE_ALL_FIELDS S1000 42000
1091 ER_CANT_DROP_FIELD_OR_KEY S1000 42000
1101 ER_BLOB_CANT_HAVE_DEFAULT S1000 42000
1102 ER_WRONG_DB_NAME S1000 42000
1103 ER_WRONG_TABLE_NAME S1000 42000
1104 ER_TOO_BIG_SELECT S1000 42000
1106 ER_UNKNOWN_PROCEDURE S1000 42000
1107 ER_WRONG_PARAMCOUNT_TO_PROCEDURE S1000 42000
1109 ER_UNKNOWN_TABLE S1000 42S02
1110 ER_FIELD_SPECIFIED_TWICE S1000 42000
1112 ER_UNSUPPORTED_EXTENSION S1000 42000
1113 ER_TABLE_MUST_HAVE_COLUMNS S1000 42000
1115 ER_UNKNOWN_CHARACTER_SET S1000 42000
1118 ER_TOO_BIG_ROWSIZE S1000 42000
1120 ER_WRONG_OUTER_JOIN S1000 42000
1121 ER_NULL_COLUMN_IN_INDEX S1000 42000
1129 ER_HOST_IS_BLOCKED 8004 HY000
1130 ER_HOST_NOT_PRIVILEGED 8004 HY000
1131 ER_PASSWORD_ANONYMOUS_USER S1000 42000
1132 ER_PASSWORD_NOT_ALLOWED S1000 42000
1133 ER_PASSWORD_NO_MATCH S1000 42000
1136 ER_WRONG_VALUE_COUNT_ON_ROW S1000 21S01
1138 ER_INVALID_USE_OF_NULL S1000 42000
1139 ER_REGEXP_ERROR S1000 42000
1140 ER_MIX_OF_GROUP_FUNC_AND_FIELDS S1000 42000
1141 ER_NONEXISTING_GRANT S1000 42000
1142 ER_TABLEACCESS_DENIED_ERROR S1000 42000
1143 ER_COLUMNACCESS_DENIED_ERROR S1000 42000
1144 ER_ILLEGAL_GRANT_FOR_TABLE S1000 42000
1145 ER_GRANT_WRONG_HOST_OR_USER S1000 42000
1146 ER_NO_SUCH_TABLE S1000 42S02
1147 ER_NONEXISTING_TABLE_GRANT S1000 42000
1148 ER_NOT_ALLOWED_COMMAND S1000 42000
1149 ER_SYNTAX_ERROR S1000 42000
1152 ER_ABORTING_CONNECTION S1000 08S01
1153 ER_NET_PACKET_TOO_LARGE S1000 08S01
1154 ER_NET_READ_ERROR_FROM_PIPE S1000 08S01
1155 ER_NET_FCNTL_ERROR S1000 08S01
1156 ER_NET_PACKETS_OUT_OF_ORDER S1000 08S01
1157 ER_NET_UNCOMPRESS_ERROR S1000 08S01
1158 ER_NET_READ_ERROR S1000 08S01
1159 ER_NET_READ_INTERRUPTED S1000 08S01
1160 ER_NET_ERROR_ON_WRITE S1000 08S01
1161 ER_NET_WRITE_INTERRUPTED S1000 08S01
1162 ER_TOO_LONG_STRING S1000 42000
1163 ER_TABLE_CANT_HANDLE_BLOB S1000 42000
1164 ER_TABLE_CANT_HANDLE_AUTO_INCREMENT S1000 42000
1166 ER_WRONG_COLUMN_NAME S1000 42000
1167 ER_WRONG_KEY_COLUMN S1000 42000
1169 ER_DUP_UNIQUE S1000 23000
1170 ER_BLOB_KEY_WITHOUT_LENGTH S1000 42000
1171 ER_PRIMARY_CANT_HAVE_NULL S1000 42000
1172 ER_TOO_MANY_ROWS S1000 42000
1173 ER_REQUIRES_PRIMARY_KEY S1000 42000
1177 ER_CHECK_NO_SUCH_TABLE S1000 42000
1178 ER_CHECK_NOT_IMPLEMENTED S1000 42000
1179 ER_CANT_DO_THIS_DURING_AN_TRANSACTION S1000 25000
1184 ER_NEW_ABORTING_CONNECTION S1000 08S01
1189 ER_MASTER_NET_READ S1000 08S01
1190 ER_MASTER_NET_WRITE S1000 08S01
1203 ER_TOO_MANY_USER_CONNECTIONS S1000 42000
1205 ER_LOCK_WAIT_TIMEOUT 41000 41000
1207 ER_READ_ONLY_TRANSACTION S1000 25000
1211 ER_NO_PERMISSION_TO_CREATE_USER S1000 42000
1213 ER_LOCK_DEADLOCK 41000 40001
1216 ER_NO_REFERENCED_ROW S1000 23000
1217 ER_ROW_IS_REFERENCED S1000 23000
1218 ER_CONNECT_TO_MASTER S1000 08S01
1222 ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT S1000 21000
1226 ER_USER_LIMIT_REACHED S1000 42000
1230 ER_NO_DEFAULT S1000 42000
1231 ER_WRONG_VALUE_FOR_VAR S1000 42000
1232 ER_WRONG_TYPE_FOR_VAR S1000 42000
1234 ER_CANT_USE_OPTION_HERE S1000 42000
1235 ER_NOT_SUPPORTED_YET S1000 42000
1239 ER_WRONG_FK_DEF S1000 42000
1241 ER_OPERAND_COLUMNS S1000 21000
1242 ER_SUBQUERY_NO_1_ROW S1000 21000
1247 ER_ILLEGAL_REFERENCE S1000 42S22
1248 ER_DERIVED_MUST_HAVE_ALIAS S1000 42000
1249 ER_SELECT_REDUCED S1000 1000
1250 ER_TABLENAME_NOT_ALLOWED_HERE S1000 42000
1251 ER_NOT_SUPPORTED_AUTH_MODE S1000 8004
1252 ER_SPATIAL_CANT_HAVE_NULL S1000 42000
1253 ER_COLLATION_CHARSET_MISMATCH S1000 42000
1261 ER_WARN_TOO_FEW_RECORDS S1000 1000
1262 ER_WARN_TOO_MANY_RECORDS S1000 1000
1263 ER_WARN_NULL_TO_NOTNULL S1000 1000
1264 ER_WARN_DATA_OUT_OF_RANGE S1000 1000
1265 ER_WARN_DATA_TRUNCATED S1000 1000
1280 ER_WRONG_NAME_FOR_INDEX S1000 42000
1281 ER_WRONG_NAME_FOR_CATALOG S1000 42000
1286 ER_UNKNOWN_STORAGE_ENGINE S1000 42000

时间: 2024-11-05 20:47:07

mysql错误编号和jdbc对应的sql编号对应一览的相关文章

解决mysql的错误 CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1300 Invalid utf8 character string: '\xBF\xA5'

报错: CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1300 Invalid utf8 character string: '\xBF\xA5' 解决方法: $currentPrice = $currentPrice * 1; => $currentPrice 原本是字符串的 数字,导致插入数据库失败. =>所以只要改成 数字 即可. =>字符串的 数字 ,乘以 1 就会变

Mysql错误编码和解释表

Mysql错误编码和解释表1.错误消息的组成 一共由三部分组成 mysql数字错误代码,这个数字的mysql的特定值,不可以移植到其它数据库系统. 一个五位长度的sqlstate值,这些值取自ANSI SQL和ODBC,并且更加标准化.并不是所有的MySQL错误号都具有相应的SQLSTATE值.在这些情况下,使用'HY000' (一般错误). 错误的消息描述 2.一些额外的说明 如果需要错误检查,请使用错误代码,而不是错误消息. 如果数据库管理员更改语言设置,则会影响错误消息的语言. 错误代码在

IDEA连接MySQL错误

参考:https://www.dazhuanlan.com/2019/08/25/5d616a1fe73ac/ IDEA连接MySQL错误 MySQL8.0配置成功后,在idea中进行连接,发现报错信息如下: Connection to @localhost failed. [08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up. 这实际上是mysql的url时区

MySQL java连接被拒绝:java.sql.SQLException: Access denied for user 'root'@'****' (using password: YES)

java.sql.SQLException: Access denied for user 'root'@'***.**.**.**' (using password: YES) MySQL服务器部署在Linux上,错误中被我隐掉的是我的公网IP. 这是由于"IP为***.**.**.**,名字为root"的用户 没有权限访问数据库 解决办法: 通过Navicat连接数据库,执行下面内容: grant all privileges on *.* to [email protected]

mysql操作命令梳理(5)-执行sql语句查询即mysql状态说明

在日常mysql运维中,经常要查询当前mysql下正在执行的sql语句及其他在跑的mysql相关线程,这就用到mysql processlist这个命令了.mysql> show processlist;            //查询正在执行的sql语句mysql> show full processlist;       //查询正在执行的完整sql语句mysql> kill connection id           //停掉processlist查询出的某个线程,id是对应的

mysql错误:Error Code: 1175. You are using safe update mode and you tried to update a table……

今天遇到一个mysql错误: Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode, toggle the option in Preferences -> SQL Queries and reconnect. 网上查了一下,原来是SET SQL_SAFE_UPDATES

C# Mysql You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ????

有几年没用过MySql数据了,今天在使用C#访问MySql数据库时出现了一个小插曲. 错误提示: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ??? 当然,错误提示已经很明白的说明是sql的语法错误. 然而,我的sql 语句是 select count(*) from tab

[org.hibernate.engine.jdbc.spi.SqlExceptionHelper]SQL Error: 1064, SQLState: 42000问题的解决办法

[org.hibernate.engine.jdbc.spi.SqlExceptionHelper]SQL Error: 1064, SQLState: 42000问题的解决办法. 出现这种情况的原因可能是表中的列名和MySQL的保留关键字发生了冲突.找到冲突的字段,修改即可. 也可能是列中存在空格,比如TOTAL_  REVENUE,下划线中存在空格,以至于加载列时报错. 原文地址:https://www.cnblogs.com/heyesp/p/8295303.html

Java JDBC下执行SQL的不同方式

Java JDBC简介 ? 数据库驱动程序是JDBC程序和数据库之间的转换层,数据库驱动程序负责将JDBC调用映射成特定的数据库调用,使用Java JDBC API进行编程,可以为多种关系数据库提供统一访问. jdbc的驱动通常有四种类型 ? JDBC-ODPC桥: 它将JDBC API映射到ODPC API.再让JDBC-ODPC调用数据库本地驱动代码(也就是数据库厂商提供的数据库操作二进制代码库,例如Oracle中的oci.dll) 本地API驱动 直接将JDBC API映射成数据库特定的客