view · edit · sidebar · attach · print · history

Export Database with Japanese characters

  • mysqldump -u root -p --opt --quote-names --skip-set-charset --default-character-set=utf8 yuka > /tmp/yuka_utf8.sql
 make sure you really export UTF-8 characters

Create Database

  • mysql --user=root -p --execute="DROP DATABASE yuka; CREATE DATABASE yuka CHARACTER SET utf8 COLLATE utf8_general_ci;"

Import

  • mysql --user=root -p --default-character-set=utf8 yuka < /home/zdavatz/yuka_utf8.sql

/etc/mysql/my.cnf

[myslqd]

  • max_allowed_packet = 16M
view · edit · sidebar · attach · print · history
Page last modified on June 23, 2013, at 09:59 AM