当前位置:网站首页>MySQL的grant语句
MySQL的grant语句
2022-07-31 00:00:00 【Miracle_ze】
grant语句
1.作用:授权
grant 普通数据用户,查询、插入、更新、删除 数据库中所有表数据的权利
grant 数据库开发人员,创建表、索引、视图、存储过程、函数等权限。
2.语句格式
grant all【权限】[privileges] on 库.表 用户名@localhost【如果是本地就写这个】identifield by '密码';
1.库.*与库.表区别
1.库.* 是给用户这个库所有表相应的权限,对库中的所有表可以使用授予的权限


2.库.*表是给用户库中指定的表有相应的权限,对库中非指定表不可以使用授予的权限


2.查看 MySQL 用户权限
1.自身权限查看
show grants;
例如:
2.查看其他 MySQL 用户权限
show grants for [email protected];
例如:
3.撤销已经赋予给 MySQL 用户权限的权限。
revoke 跟 grant 的语法差不多,只需要把关键字 to 换成 from 即可:
revoke all【权限】 on *.* from [email protected];
边栏推荐
猜你喜欢

joiplay模拟器如何调中文

How to solve types joiplay simulator does not support this game

实验7(MPLS实验)

CPM:A large-scale generative chinese pre-trained lanuage model

Reverse linked list - head insertion inversion method

从编译的角度来学作用域!

C# VSCode & Rider引用命名空间快捷键

HCIP第十五天笔记

PS Basic Learning (1)

【LeetCode】42. 接雨水 - Go 语言题解
随机推荐
.NET 跨平台应用开发动手教程 |用 Uno Platform 构建一个 Kanban-style Todo App
HCIP Day 15 Notes
How to import game archives in joiplay emulator
How to solve types joiplay simulator does not support this game
el-upload添加请求头
Chevrolet Trailblazer, the first choice for safety and warmth for your family travel
测试人面试 常被问到的计算机网络题,高薪回答模板来了
2022 China Logistics Industry Conference and Entrepreneur Summit Forum will be held in Hangzhou!
Summary of BFS questions
软件开发设计流程
【LeetCode】64. 最小路径和 - Go 语言题解
uniapp开发微信小程序-软考刷题小程序
How to install joiplay emulator rtp
jira是什么
"Wei cup" school more than 2022 cattle summer camp 4 Nancy (polocy) pelosi article variance law of Arts
软考学习计划
常用的正则表达式
WebServer process explanation (registration module)
flex-direction容器属性
firewalld