Convert latint1 database to UTF-8

$> mysqldump --opt -Q -u USER -p PASSWORT -h HOST DB > dump.sql
$> sed -i 's/CHARSET=latin1/CHARSET=utf8 COLLATE=utf8_unicode_ci/g' dump.sql
$> sed -i 's/SET NAMES latin1/SET NAMES utf8/g' dump.sql
$> mysql -u USER -pPASSWORT --default-character-set=utf8 database < dump.sql

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.