-- ========================================
-- 数据库初始化脚本
-- ========================================
-- 用途：创建数据库并设置基本配置
-- 使用方法：mysql -u root -p < init.sql
-- ========================================

-- 创建数据库
CREATE DATABASE IF NOT EXISTS `campus_health` 
  DEFAULT CHARACTER SET utf8mb4 
  DEFAULT COLLATE utf8mb4_unicode_ci;

-- 使用数据库
USE `campus_health`;

-- 设置时区
SET time_zone = '+08:00';

-- 显示数据库信息
SELECT 
  '数据库创建成功' AS status,
  DATABASE() AS database_name,
  @@character_set_database AS charset,
  @@collation_database AS collation,
  NOW() AS created_at;


