I ran into a big trouble. I made mysql dump using version 5.0.77 without setting the compatibility mode (I wasn't aware of this problem). Actual mysql server is version 4.0.18. Today our database crashed. Lots of tables lost. While trying to restore the dump, it's returning error "ERROR 1193 at line 18: Unknown system variable 'character_set_client'". Is there any way we can restore the db?
Thanks a lot for you help.
It may well be worth installing, on another box if required, mysql 5.0.77, restoring, and then re-dumping with the appropriate options.
This isn't an elegant solution, but if you're in "big trouble" and need something that works and fast, this is the first thing that jumped into my mind.
Hope your dump file isn't too big. Copy it and edit it. If it's really large, use
sed
or a script. If it's small enough, vim it.sed '/\/*!40101 SET character_set_client'/d < original > copy
Anywhere you see the string
/*!40101 SET character_set_client
delete that line. The server doesn't understand it anyway and it won't affect your data.