MySQL errors (80) — causes and fixes
80 MySQL errors, each reproduced and fixed on a real database. Pick an error to see the actual output, the fix SQL and the result.
- MySQL10401 causesToo many connections
- MySQL10444 causesAccess denied for user 'lab_b'@'%' to database 'shop'
- MySQL10455 causesAccess denied for user 'app_user'@'127.0.0.1' (using password: YES)
- MySQL10463 causesNo database selected
- MySQL10485 causesColumn cannot be null
- MySQL10494 causesUnknown database
- MySQL10504 causesTable already exists
- MySQL10513 causesUnknown table
- MySQL10523 causesColumn 'id' in field list is ambiguous
- MySQL10544 causesUnknown column
- MySQL10555 causesExpression is not in GROUP BY clause and contains nonaggregated column
- MySQL10592 causesIdentifier name is too long
- MySQL10603 causesDuplicate column name 'phone'
- MySQL10612 causesDuplicate key name 'idx_orders_customer'
- MySQL10624 causesDuplicate entry for key
- MySQL10646 causesYou have an error in your SQL syntax
- MySQL10673 causesInvalid default value
- MySQL10683 causesMultiple primary key defined
- MySQL10714 causesSpecified key was too long
- MySQL10753 causesIncorrect table definition; there can be only one auto column and it must be defined as a key
- MySQL10913 causesCan't DROP 'fax'; check that column/key exists
- MySQL10934 causesYou can't specify target table for update in FROM clause
- MySQL11013 causesBLOB, TEXT, GEOMETRY or JSON column can't have a default value
- MySQL11113 causesInvalid use of group function
- MySQL11184 causesRow size too large
- MySQL11364 causesColumn count doesn't match value count at row 1
- MySQL11382 causesInvalid use of NULL value
- MySQL11424 causescommand denied to user for table
- MySQL11433 causescommand denied to user for column
- MySQL11465 causesTable doesn't exist
- MySQL11663 causesIncorrect column name
- MySQL11703 causesBLOB/TEXT column used in key specification without a key length
- MySQL11723 causesResult consisted of more than one row
- MySQL11754 causesYou are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
- MySQL11763 causesKey 'idx_cust' doesn't exist in table 'orders'
- MySQL12054 causesLock wait timeout exceeded; try restarting transaction
- MySQL12132 causesDeadlock found when trying to get lock; try restarting transaction
- MySQL12222 causesThe used SELECT statements have a different number of columns
- MySQL12262 causesUser has exceeded the 'max_user_connections' resource
- MySQL12273 causesAccess denied; you need (at least one of) the SUPER or SET_ANY_DEFINER privilege(s) for this operation
- MySQL12353 causesThis version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
- MySQL12413 causesOperand should contain 1 column(s)
- MySQL12423 causesSubquery returns more than 1 row
- MySQL12483 causesEvery derived table must have its own alias
- MySQL12644 causesOut of range value for column
- MySQL12654 causesData truncated for column
- MySQL12673 causesIllegal mix of collations for operation '='
- MySQL12903 causesThe MySQL server is running with the --secure-file-priv option
- MySQL12925 causesIncorrect date value / Incorrect datetime value
- MySQL13053 causesFUNCTION lab_a.addtax does not exist
- MySQL13183 causesIncorrect number of arguments for PROCEDURE; expected 2, got 1
- MySQL13292 causesNo data - zero rows fetched, selected, or processed
- MySQL13646 causesField doesn't have a default value
- MySQL13665 causesIncorrect integer, decimal or string value for column
- MySQL13963 causesOperation CREATE USER failed for 'app'@'%'
- MySQL14065 causesData too long for column
- MySQL14102 causesYou are not allowed to create a user with GRANT
- MySQL14182 causesThis function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled
- MySQL14192 causesYou do not have the SUPER privilege and binary logging is enabled
- MySQL14422 causesCan't update table in stored function/trigger because it is already used by statement
- MySQL14493 causesThe user specified as a definer does not exist
- MySQL14515 causesCannot delete or update a parent row: a foreign key constraint fails
- MySQL14526 causesCannot add or update a child row: a foreign key constraint fails
- MySQL15242 causesPlugin 'mysql_native_password' is not loaded
- MySQL15533 causesCannot drop index: needed in a foreign key constraint
- MySQL16302 causesFUNCTION does not exist. Check the 'Function Name Parsing and Resolution' section
- MySQL16443 causesSIGNAL from a trigger or procedure
- MySQL16903 causesBIGINT UNSIGNED value is out of range
- MySQL17012 causesCannot truncate a table referenced in a foreign key constraint
- MySQL18202 causesYou must reset your password using ALTER USER statement before executing this statement.
- MySQL18222 causesFailed to add the foreign key constraint. Missing index
- MySQL18243 causesFailed to open the referenced table
- MySQL30242 causesQuery execution was interrupted, maximum statement execution time exceeded
- MySQL31182 causesAccess denied for user 'app_user'@'127.0.0.1'. Account is locked.
- MySQL31403 causesInvalid JSON text in value for column
- MySQL37303 causesCannot drop table referenced by a foreign key constraint
- MySQL37803 causesReferencing column and referenced column in foreign key constraint are incompatible
- MySQL38193 causesCheck constraint is violated
- MySQL39552 causesAccount is blocked due to consecutive failed logins
- MySQL61253 causesFailed to add the foreign key constraint. Missing unique key