Sebastian Mogilowskis Blog

Just another blog about administration, linux and other stuff

utf-8

MySQL command line import of file with UTF-8 encoding

A Post-It note for me … Importing an UTF-8 encoded MySQL Database export file with MySQL command line interface: mysql -D databasename -h hostname -p -u db_username –default_character_set utf8 < sqlfile.sql If you don’t add the “–default_character_set utf8” flag you will get very funny characters in your database 🙂

, , , ,