一、创建最新编码utf8mb4格式的库:
CREATE DATABASE IF NOT EXISTS yourdbname CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
二、创建最编码utf8格式的库:
CREATE DATABASE IF NOT EXISTS yourdbname DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
CREATE DATABASE IF NOT EXISTS yourdbname CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE DATABASE IF NOT EXISTS yourdbname DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
转载于:https://www.cnblogs.com/xrhou12326/p/5336589.html