CREATE DATABASE IF NOT EXISTS yourdbname DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
打开my.cnf后,在文件内的[mysqld]下增加如下两行设置: