mysql5.6的默认配置是不适合小型站点的,win的话在my.ini里修改、linux则在/etc/my.cnf的[mysqld]下修改参数,有就修改,没有就追加:performance_schema_max_table_instances=400
table_definition_cache=400
table_open_cache=256修改完毕后,重启mysql服务。service mysql restart
CREATE DATABASE `test2` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;修改编码ALTER DATABASE database_name CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;