1051: Unknown table 'x'
MySQLWhat does it mean?
The referenced table does not exist. No table with the given name was found during a drop, alter or query.
Why does it happen?
A misspelled table name; the table never created or already dropped; the wrong database (schema) selected; case sensitivity (table names are case-sensitive on Linux); DROP TABLE on a nonexistent table.
How to fix it
List existing tables: SHOW TABLES; and select the right database: USE mydb; Fix the table name and its case. To avoid the error on drop: DROP TABLE IF EXISTS my_table; If it is in another schema, qualify it as schema.table.
More from this engine
- 1406Data too long for column
- 1071Specified key was too long; max key length is 767 bytes
- 1050Table already exists
- 1091Can't DROP 'x'; check that column/key exists
- 1093You can't specify target table 'x' for update in FROM clause
- 1305PROCEDURE does not exist
- 1227Access denied; you need (at least one of) the PRIVILEGE