Files
schoolNews/schoolNewsServ/.bin/mysql/sql/createDB.sql
2025-10-16 18:03:46 +08:00

17 lines
467 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- 修复字符编码问题
-- 删除现有数据库(如果存在)
DROP DATABASE IF EXISTS `school_news`;
-- 创建数据库使用utf8mb4字符集
CREATE DATABASE `school_news` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-- 使用数据库
USE `school_news`;
-- 设置会话字符集
SET NAMES utf8mb4;
SET CHARACTER SET utf8mb4;
SET character_set_client = utf8mb4;
SET character_set_connection = utf8mb4;
SET character_set_results = utf8mb4;