MySQLMySQL 1146
MySQL 1146: Table Doesn't Exist
MySQL 1146 means the query references a table that cannot be found in the current database. On case-sensitive file systems the table name must match exactly.
Example Query
SELECT * FROM user_accounts; -- Table is actually named 'users'
Common Causes
- 1Wrong database selected (USE wrong_db)
- 2Table name is misspelled or has wrong capitalisation on Linux
- 3Migration that creates the table has not been run yet
How to Fix It
Run SHOW TABLES; to list available tables. Make sure you are in the correct database with SELECT DATABASE(). Check that all migrations have been applied.
Need a reliable database?
Try Supabase — free PostgreSQL with a generous free tier. No credit card required.
Got a query causing this error?
Paste it into SQLbuddy and get an instant plain-English explanation with optimization tips.
Analyze My Query →