Search code examples
mysqlsqlmysql-error-1193

MySQL import/export version incompatibilty


I have taken a dump from my mysql database on my own server (version 5.0.67) and I have tried to import it to my other database (version 5.0.54). However, I get the error:

ERROR 1193 (00000) at line 23: Unknown system variable 'character_set_client'

I think it refers to this part:

SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;

I have tried removing all the above lines but that made the error worse:

ERROR 1064 (00000) at line 23: 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 'DEFAULT CHARSET=latin1 COMMENT='InnoDB free: 10240 kB; (`member

Any help would be greatly appreciated.

UPDATE

I used the compatibility option like so but when importing I still get the same error!? WTF

mysqldump -u root -p dbname --compatible=mysql40  > mrdb.sql

Solution

  • If you're using mysqldump to do the data dump, then there's a --compatibility option which you can set to some earlier version. 5.0.54 is kinda buggy so upgrade that beast when you have a chance.