SQL dump import fails: "You have an error in your SQL syntax" (MySQL error 1064)
Last reviewed 2026-09-19
A SQL dump is a long list of statements. If the export was cut off, edited by hand or split in the wrong place, one statement ends up missing its semicolon or closing bracket, and the importer fails at that point, sometimes many megabytes into the file.
Messages you might see
- “ERROR 1064 (42000): You have an error in your SQL syntax”
- “Unterminated string / unexpected end of statement”
Why it happens
- The dump was cut off by a timeout or full disk, leaving the last statement incomplete.
- A semicolon or closing parenthesis was lost in an INSERT.
- A quote inside a value was not escaped and swallows the following statements.
Try this first (free, no tool needed)
- Read the line number in the error, then look at that statement and the one before it.
- Check the end of the file: it should finish with a complete statement, not stop mid-INSERT.
- Re-run the export if you still have the source, using the tool's own dump command.
If that didn't work
These tools run in your browser. Your file is read and repaired on your own device and is never uploaded.
Broken SQL Dump Repair
Walks the dump aware of quotes (semicolons and brackets inside strings are ignored), restores missing statement terminators and closing parentheses on INSERTs, and reports any unclosed quote for you to look at instead of guessing.
Open Broken SQL Dump RepairCommon questions
Does it fix data inside values?
No. It fixes statement structure. An unclosed quote is reported for a manual look rather than guessed.
Is my file uploaded anywhere?
No. The tool runs as a program inside your own browser, so the file is read and repaired on your device and never sent to a server.