My friend install serendipity (blog engine) in his laptop with mysql version 4.1.21 and dumping sql of his blog. When I try to restore sql file in his PC I got error message :
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Administrator>cd c:\appserv\mysql\bin
C:\AppServ\mysql\bin>mysql -uroot -p alam < blog.sql
ERROR 1064 at line 21: You have an error in your SQL syntax. Check the manual t
hat corresponds to your MySQL server version for the right syntax to use near ‘DEFAULT CHARSET=latin1’ at line 12
Then I realize that mysql server in my friend pc using 4.0.16, DEFAULT CHARSET=latin1 is everywhere in his sql file , this part not needed in mysql 4.0.16
Quick Solution is delete that part.
Still open sql file in wordpad, I choose replace, find DEFAULT CHARSET=latin1 with nothing . Press ‘Replace All’ button. Save the file and try to restore new sql file.