I was importing a dump from another system into a MySQL database running on 64-bit Linux Mint when I got the error below.:-

12:42:37 Restoring Patient (Results) Running: mysql --defaults-extra-file="/tmp/tmpejgN41/extraparams.cnf"  --host=localhost --user=root --port=3306 --default-character-set=utf8 --comments < "/home/etb/dumps/Dump20141112/Patient_Results.sql" ERROR 1064 (42000) at line 650: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''\0\0\0\0 $Name: rel_1_2_0_rc1b  $\n\0%071116019 ̿\n\0\0\0\0\0\0@ \0?Q \Z\0\0?' at line 1

Operation failed with exitcode 1 12:56:20 Import of /home/mjh/dumps/Dump20141112 has finished with 1 errors

It makes no sense to me as how can I have an SQL syntax error when 606 lines out of approximately 2000 had been imported correctly. Searching the internet has not added anything further so far. I am arranging for the data to be dumped again so I can retry later today.

  • Look at the contents of the file itself. Looks to me as if it has a version control header at the top which will mess things up somewhat. Also, MySQL supports inserting multiple values per insert statement, so it's perfectly plausible that 606/2000 have inserted correctly if the first INSERT statement has errored due to crappy characters before it in the file. – Philᵀᴹ Feb 3 '15 at 16:24
  • I tried again and it failed in the same place.A new back up loaded without problems so I think you are right about corruption. I tried looking at the file but could see nothing before the first record (row). As each row contains one or more BLObs I could not go further through the file. – MichaelJohn Feb 4 '15 at 17:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.