Last active
August 29, 2015 14:10
-
-
Save ronanguilloux/8dda134da99f4fee80f5 to your computer and use it in GitHub Desktop.
Fixing latin1, non-utf8 chars in an utf8 MySQL table
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #source: http://stackoverflow.com/a/4462765/490589 | |
| mysqldump -h DB_HOST -u DB_USER -p DB_PASSWORD --opt --quote-names \ | |
| --skip-set-charset --default-character-set=latin1 DB_NAME > DB_NAME-dump.sql | |
| mysql -h DB_HOST -u DB_USER -p DB_PASSWORD \ | |
| --default-character-set=utf8 DB_NAME < DB_NAME-dump.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment