0

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
OMG Ponies
  • 325,700
  • 82
  • 523
  • 502
Abs
  • 56,052
  • 101
  • 275
  • 409

3 Answers3

3

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.

pevik
  • 4,523
  • 3
  • 33
  • 44
James
  • 3,852
  • 2
  • 19
  • 14
1

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.

Ali
  • 261,656
  • 265
  • 575
  • 769
0

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
  • 32,620
  • 21
  • 85
  • 124