Looks like this issue is just the wrong version of MySQL, need to go to 5.5

So I have a backup of an offsite source SQL database. I am not sure how they are preforming the data dump but I am trying to find out. This database needs to be imported on the new computer. Every time I try to run the commands below I get the error (at the bottom of the post). I want to be able to load this data with out an error. What do I need to do to get the data to load correctly? So far none of the tables load at all from the dump.

mysql -u username -p database_name < file.sql

I get the error 1064. I also tried to load this in MySQL with

source \home\user\Desktop\test.sql;
  • MySQL v12.22 Distrib 4.0.26-nt-max, for Win32 (ia32)
  • Protocol version, 10
  • Client characterset, latin1
  • Server characterset, latin1
  • Windows XP SP3
  • InnoDB is coming up at the type in show create table tablename;

ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL version for the right syntax to use near 'DEFAULT CHARSET=latin1' at line 1

when trying to add a different table

ERROR 1074: Too big column length for column 'City' . Use BLOB instead

ok I kept messing with this, the following code works when I remove, DEFAULT CHATSET=latin1

  • Your version information is missing bit - what does SELECT VERSION() show? Do you know which SQL is generating those error. The 1074 error looks odd. A column too big for a city name - I don't know of any cities having 30 character names let alone 64k names. Do you know what source database version?
    – danblack
    Commented Mar 21, 2019 at 0:40
  • We can't help you without seeing the original text that got the error! It sounds like you had the DEFAULT CHARSET clause in the wrong spot.
    – Rick James
    Commented Mar 22, 2019 at 22:54
  • @RickJames It is probably in the right spot. ended up finding out it is an error caused by having the incorrect version of MySQL. Commented Mar 25, 2019 at 17:16

1 Answer 1


In the commandline tool, use forwardslash, not backslash, for path delimiters:

source /home/user/Desktop/test.sql;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.