mysqldump --user=username --password=password --default-character-set=latin1 --skip-set-charset dbname > dump.sqlsed -r 's/latin1/utf8/g' dump.sql > dump_utf.sqlmysql --user=username --password=password --execute="DROP DATAbase dbname; CREATE DATAbase dbname CHARACTER SET utf8 COLLATE utf8_general_ci;"mysql --user=username --password=password --default-character-set=utf8 dbname < dump_utf.sql
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)