---
title: "with grant option&with admin option"
author: "cqupt_zlf"
date: "2015-03-14T15:45:01Z"
tags: []
categories: ["数据库"]
slug: "with-grant-option-with-admin-option"
draft: false
lastmod: "2015-03-14T15:45:01Z"
id: 2192306
url: "https://cqzlf.iteye.com/blog/2192306"
---

with admin option 用于系统权限授权，with grant option 用于对象授权。

但给一个用户授予系统权限带上with admin option 时，此用户可把此系统权限授予其他用户或角色，但收回这个用户的系统权限时，这个用户已经授予其他用户或角色的此系统权限不会因传播无效，如授予A系统权限create session with admin option,然后A又把create session权限授予B,但管理员收回A的create session权限时，B依然拥有create session的权限，但管理员可以显式收回B create session的权限，即直接revoke create session from B.

而with grant option用于对象授权时，被授予的用户也可把此对象权限授予其他用户或角色，不同的是但管理员收回用with grant option授权的用户对象权限时，权限会因传播而失效，如grant select on table with grant option to A,A用户把此权限授予B，但管理员收回A的权限时，B的权限也会失效，但管理员不可以直接收回B的SELECT ON TABLE 权限。