Sebastian Mogilowskis Blog

Just another blog about administration, linux and other stuff

Language: German English

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 :-)

, , , ,

Leave a Reply

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

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

eMail-Benachrichtigung bei weiteren Kommentaren.
Auch möglich: Abo ohne Kommentar.