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

utf8

Hey Tao! How funny... I was just Googling for this same information (I can never remember the arg) and happy to find you here. Hope the new gig is going well.

Best,
Scot

coincidences abound

Hello Tao,

Just came across this googling for the right command flag too! Hope you're well!

Louise

No way

Hi Louise! Small internet isn't it?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.