How to Fix MySQL Error 1146: Table Doesn't Exist
By Sharon Ben-Moshe · August 8, 2026 · 3 min read
Sharon Ben-Moshe is the founder of sqlfmt, a browser-based SQL formatter and validator with misspelled-keyword suggestions across PostgreSQL, MySQL, SQLite, SQL Server, and BigQuery.
MySQL's Error 1146 (“Table '...' doesn't exist”) almost always comes down to a missing database prefix, a case mismatch on a case-sensitive filesystem, or a table that never actually got created. Here's how to tell which.
Quick answer
MySQL Error 1146 (SQLSTATE 42S02) fires when a query references a table MySQL can't find in the current database — most often because the table lives in a different database, its name's case doesn't match on a case-sensitive filesystem, or a CREATE TABLE never actually committed. SHOW TABLES confirms what MySQL currently sees.