import utf-8 mysqldump to latin1 database
问题 I have a dump file of a phpnuke site somehow in utf8. I'm trying to reopen this site on a new server. But nuke uses latin1. I need a way to create a latin1 database using this utf-8 dump file. I tried everything I could think of. iconv, mysql replace, php replace... 回答1: Add the SET NAMES 'utf8'; statement at the beginning of your dump. This will indicate to MySQL that the commands it is about to receive are in UTF8. It will store the data in whatever character set your tables are currently