-- docker/mysql/init/init.sql
-- 初始化数据库和用户
CREATE DATABASE IF NOT EXISTS shop_mallnew CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER IF NOT EXISTS 'shop_mallnew'@'%' IDENTIFIED BY 'shop_mallnew';
GRANT ALL PRIVILEGES ON shop_mallnew.* TO 'shop_mallnew'@'%';

CREATE DATABASE IF NOT EXISTS 5g CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER IF NOT EXISTS '5g'@'%' IDENTIFIED BY '123456';
GRANT ALL PRIVILEGES ON 5g.* TO '5g'@'%';

-- 刷新权限
FLUSH PRIVILEGES;

-- 你可以根据需要添加更多的初始化SQL语句