时间:2021-07-01 10:21:17 帮助过:17人阅读
- 创建用户
增: mysql> create user zyc@‘43.82.209.%‘ identified by ‘123‘; 查: mysql> desc mysql.user; mysql> select user ,host ,authentication_string from mysql.user 改: mysql> alter user zyc@‘43.82.209.%‘ identified by ‘456‘; 删: mysql> drop user zyc@‘43.82.209.%‘;
- 授权
ALL:
SELECT,INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN,
PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER,
CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE,
REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE,
ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE
ALL : 以上所有权限,一般是普通管理员拥有的
with grant option:超级管理员才具备的,给别的用户授权的功能
1 mysql> grant all on wordpress.* to wordpress@‘43.82.209.%‘ identified by ‘123‘;
#grant:授权命令
#all:权限
#on: 作用命令
#wordpress.*:权限的作用范围
##
*.* --->全库.全表 管理员用户
wordpress.* --->wordpress库 应用开发用户
wordpress.t1
##
#to: 作用命令2 mysql> grant select ,update,insert,delete on app.* to app@‘43.80.209.%‘ identified by ‘123‘;
- 查看授权
1 mysql> show grants for zyc@‘43.82.209.%‘;
- 回收授权
1 mysql> revoke delete on app.* from zyc@‘43.82.209.%‘;
MySQL 基础管理
标签:The 应用 from proc tab date cli grants user