Files
performance-evaluation-system/backend/create-db-user.sql
2026-04-11 11:51:54 +08:00

15 lines
437 B
SQL
Raw Permalink 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.

-- 创建新的数据库用户(如果你能以 root 身份登录 MySQL
-- 在 MySQL 命令行中执行此脚本
-- 创建用户(密码设置为 123456
CREATE USER IF NOT EXISTS 'emp_user'@'localhost' IDENTIFIED BY '123456';
-- 授予权限
GRANT ALL PRIVILEGES ON employee_performance.* TO 'emp_user'@'localhost';
-- 刷新权限
FLUSH PRIVILEGES;
-- 显示用户
SELECT User, Host FROM mysql.user WHERE User = 'emp_user';