DBAtlas · Database operations atlas

1051: Unknown table 'x'

MySQL

What 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.

Open in DBAtlas →

More from this engine