mysql

Mysqldump and Unicode

I have been having a persistant problem with unicode getting munched when I upgraded my sites. Turns out I have been messing up when I copy my old db. I should be doing:

mysqldump -h host -u user -ppassword --default-character-set=utf8 old_db > db.mysql

mysql -h host -u user -ppassword --default-character-set=utf8 new_db < db.mysql

Syndicate content