数据库的权限

mac2022-06-30  113

mysql 数据的权限实质都是在 user 表里控制的

1、grant

grant all on *.* to 'ads'@'localhost' identified by '123456' with grant oprion; # all:所有的权限 # *.*:所有数据库下面的所有表 # 'ads':用户 # 'localhost':用户 ip # '123456':密码 # with grant oprion:有执行grant 语句的权限

2、修改 user 表的数据

flush privileges; #刷新权限

3、取消权限 --- revoke

revoke all on *.* from ads@localhost;

转载于:https://www.cnblogs.com/lynn-chen/p/9010822.html

相关资源:垃圾分类数据集及代码
最新回复(0)