update
This commit is contained in:
14
create-db-user.sql
Normal file
14
create-db-user.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
-- 创建新的数据库用户(如果你能以 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';
|
||||
Reference in New Issue
Block a user