Taner Şenyurt

Kişisel gelişim sitesi…

Encoding mysql dump file while importing from console

March2

If you are working with big databases we can not import dumb file from phpmyadmin or something like that.That’s why we have to know how to import dump file over console.

  1. mysql -u root -p database_name < dump_file

Sometimes, specially if our applications uses other languages than English, we have to define which encoding type we gonna use. In that cases we can select the default encoding just like this:{at least it worked for Turkish}

  1. mysql -u root -p database_name < dump_file –default-character-set=utf8
2 Comments to

“Encoding mysql dump file while importing from console”

  1. On June 2nd, 2009 at 4:34 pm KrisBelucci Says:

    I really liked this post. Can I copy it to my site? Thank you in advance.

  2. On June 4th, 2009 at 3:51 am admin Says:

    Absolutely you can if you really want to :) But if it’s possible link to me :) thank you for interest