information_schema.column_privileges 学习
mysql 的授权是分层次的 实例级 | 库级 | 表级 | 列级 而这些授权信息被保存在了mysql.user | mysql.db | mysql.tables_priv | mysql.column_priv 等表中
而information_schema.column_privileges 表中的信息来自于mysql.column_priv 表
1、information_schema.column_privileges 表中常用的列:
1、grantee :用户(对列就相应权限的用户)
2、table_catalog :表类型,好像只有一个值 def
3、table_schema :表所在的数据库名
4、table_name :表名
5、column_anme :列名
6、privilege_type :权限类型
7、is_grantable :是否可以把权限授予别人
2、例子:
查看一条对列的授权在information_schema.column_privileges 表中对应怎样的数据
2.1 授权:
GRANT SELECT (x) ON `tempdb`.`t` TO 'guest'@'127.0.0.1'
2.2 查看information_schema.column_privileges 表
select * from information_schema.column_privileges; +---------------------+---------------+--------------+------------+-------------+----------------+--------------+
| GRANTEE | TABLE_CATALOG | TABLE_SCHEMA | TABLE_NAME | COLUMN_NAME | PRIVILEGE_TYPE | IS_GRANTABLE |
+---------------------+---------------+--------------+------------+-------------+----------------+--------------+
| 'guest'@'127.0.0.1' | def | tempdb | t | x | SELECT | NO |
+---------------------+---------------+--------------+------------+-------------+----------------+--------------+
information_schema.column_privileges 学习的更多相关文章
- information_schema.referential_constraints 学习
information_schema.referential_constraints 表用于查看外键约束 1.information_schema.referential_constraints表的常 ...
- information_schema.profiling学习
information_schema.profiling可以用来分析每一条SQL在它执行的各个阶段的用时,注意这个表是session 级的,也就是说如果session1 开启了它:session2没有 ...
- information_schema.optimizer_trace学习
information_schema.optimizer_trace 用于追踪优化器的优化过程:通常来说这张表中是没有数据的,要想开户追踪要把 @@session.optimizer_trace='e ...
- information_schema.triggers 学习
mysql实例中的每一个trigger 对应到information_schema.triggers 中有一行 1.information_schema.triggers 表的常用列: 1.trigg ...
- information_schema.routines 学习
information_schema.routines 用户查看mysql中的routine信息 1.information_schema.routines 表中的常用列: 1.
- information_schema.key_column_usage 学习
information_schema.key_column_usage 表可以查看索引列上的约束: 1.information_schema.key_column_usage 的常用列: 1.cons ...
- information_schema.events 学习
information_schema.events 表保存了整个mysql实例中的event 信息 1.常用列: 1.event_catalog :永远是def 2.event_schema :eve ...
- information_schema.engines学习
当前mysql实例的存储引擎信息可以从information_schema.engines 中查询到 例子: mysql> select * from information_schema.en ...
- information_schema.columns 学习
每一个表中的每一列都会在information_schema.columns表中对应一行 1.informaiton_schema.columns 常用列: 1.table_catalog :不管是t ...
随机推荐
- Effective Java实作Comparable - 就是爱Java
当集合或数组内的对象需要排序时,会利用Collections.sort或Arrays.sort来进行排序,通常会implement Comparable,来实现自定义排序,透过回传值来表示排序的大小. ...
- 解决PopupWindow遮住输入法
1: PopupWindow中的设置 pop.setInputMethodMode(PopupWindow.INPUT_METHOD_NEEDED); pop.setSoftInputMode(Win ...
- ExpandableListView 保证只展开一组
expandableListView.setOnGroupExpandListener(new OnGroupExpandListener(){ @Override public void onGro ...
- LeetCode_Set Matrix Zeroes
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. 很挫的一个想 ...
- Windows 8.1 正式版镜像下载大全
该系统已有更新的版本,请转至<Windows 8.1 with update 官方最新镜像汇总>下载. [声明:所有资源均来自于网络,请购买正版授权后再使用.]Win8.1 正式版原版镜像 ...
- mac OSX上eclipse adb无法识别(调试)小米的解决方案
最近在Mac上开发安卓,用小米2a作为开发机,连上电脑后发现idea和eclipse真机调试的时候都提示USB device not found.经过一番google和百度,终于找到了解决方案,在这里 ...
- EBS R12 查询EBS用户相关SQL
--R12查询EBS在线用户SQL SELECT U.USER_NAME, APP.APPLICATION_SHORT_NAME, FAT.APPLICATION_NAM ...
- LeetCode198 House Robber
You are a professional robber planning to rob houses along a street. Each house has a certain amount ...
- 腾讯课堂-草图大师 Sketchup 初级到精通视频讲座
腾讯课堂-草图大师 Sketchup 初级到精通视频讲座 草图大师 Sketchup 初级到精通视频讲座
- android滑动基础篇 TouchView
效果图: 代码部分: activity类代码: package com.TouchView; import android.app.Activity; import android.os.Bundle ...