Dumping and importing MySQL database in UTF-8



First you need to dump the database the safe way using --default-character-set and --result-file

mysqldump -uroot -ppasswrod -h host database--default-character-set=utf8 --result-file dump.sql

Than you need to connect to mysql the safe way

mysql -uroot -p --default-character-set=utf8 database

Then import the dumpbed file

source dump.sql



Users feedback ( 1 )

Any thoughts?

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Loading more content...