Taner Şenyurt

Kişisel gelişim sitesi…

Encoding mysql dump file while importing from console


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