MySQL Error 1064: SQL Syntax Error During Import
Version differences.
Error 1064 means MySQL could not understand part of the SQL in your file. It usually happens when importing a dump from a different MySQL or MariaDB version.
Step 1: Read the message

It shows near '...' at line 42. Open the file and look at that line.
Step 2: Check for truncated files

A cut-off file ends mid-statement. Compare the file size to the original and re-export.
Step 3: Check version differences

Words such as utf8mb4_0900_ai_ci or ROW_FORMAT are not supported on older servers. Replace the collation with utf8mb4_unicode_ci.
Step 4: Check the export settings

Re-export with compatibility set to MYSQL40 off, and without Add DROP and CREATE options that clash.
Step 5: Check reserved words

Table or column names such as order need backticks.
Step 6: Import in the right order

Create the empty database first and select it before importing.
Step 7: Retry

Import again after the edit.
Still stuck?
If these steps do not solve it, we fix it for you for a flat $99. Full refund if we do not solve it within 7 days.
Related guides
- WordPress: Clone a Site to a Subdomain for Testing
- Rollback Plan: How To Undo a Change in 5 Minutes
- Restore One File or One Database Table From a Backup Without Rolling Back Everything
- phpMyAdmin Import Fails: File Too Large or Script Timed Out