1.创建UTF-8字符集数据库
CREATE DATABASE db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
2.修改数据库的字符集
ALTER DATABASE db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci