第九天 mysql的数据权限操作
mysql 当中的数据权限操作:mysql数据库 --->
insert into 添加用户
useage : 代表没有任何权限
all :代表拥有所有的权限
show grants for wuhan@"LOCALHOST":查看用户权限
1.检查当前的host字段
wuhan | localhost
update user set password = password("123456")
where user="wuhan";
2.刷新flush privileges;
"赋权:单个的权限"
grant select,update on *.*
to"wuhan"@"localhost" identified by"123456" ;
"赋权所有的权限"
grant all privileges on *.* to"wuhan"@"localhost"
identified by "123456"
撤销权限
revoke all on *.* from "wuhan"@"localhost";
创建用户同时授权:
本地权限:localhost
远程权限: %
创建一个远程访问的root账号 (在后期会用到)
grant all privileges on *.* to"root"@"%"
identified by"123456";
select database():
select version():查看当前使用的mysql 版本
select user();查看当前正在操作的用户
页:
[1]