views:

551

answers:

3

Hi

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
+1  A: 

If you install phpMyAdmin, you can use it to export the database. When you click 'Export' you will see an option for 'compatibly mode' where you can select MySQL 4 and 3.

Click Upvote
+2  A: 

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.

James
A: 

Mightn't the order of the variables be wrong? Just a guess.

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