MySQLMySQL 1064

MySQL 1064: You Have an Error in Your SQL Syntax

MySQL 1064 is the most common MySQL error and means the query contains invalid SQL syntax that the parser cannot understand. It is triggered at parse time, before any data is accessed.

Example Query

SELECT * FORM users WHERE id = 1;

Common Causes

  1. 1Typo in a keyword (e.g. FORM instead of FROM)
  2. 2Missing comma between column names in a SELECT or INSERT list
  3. 3Using a reserved word as an unquoted column or table name

How to Fix It

Check the character position MySQL reports in the error message — the problem is usually just before that point. Look for misspelled keywords, missing commas, or unquoted reserved words. Wrap reserved-word identifiers in backticks (e.g. `order`).

Need a reliable database?

Try Supabase — free PostgreSQL with a generous free tier. No credit card required.

Get started free →

Got a query causing this error?

Paste it into SQLbuddy and get an instant plain-English explanation with optimization tips.

Analyze My Query →