该Schema Privileges
面板包含以下部分,用于为您的模式创建用户和定义角色:
用户
角色
下图显示了MySQL 模型选项卡
的Schema
Privileges
部分。
要添加用户,请双击该Add User
图标。这将创建一个具有默认名称的用户
user1
。双击此用户将打开停靠在应用程序底部的用户编辑器。
在 中,使用名称和
密码字段User Editor
设置用户名和密码。通过从右侧的字段中选择所需的角色,然后单击<,为用户分配一个或多个角色
。可以通过向相反方向移动角色来撤销角色。
右键单击用户会打开上下文菜单。菜单中的项目如第 9.1.1.5.2 节“添加角色和对象权限”中所述。
要添加角色,请双击“添加角色”
图标。此操作在架构权限面板的角色区域中创建一个具有默认名称
role1
的角色,并打开角色编辑器。该编辑器在编辑器底部有两个选项卡:Role和
Privileges。
要打开包含以下操作的上下文菜单,请右键单击现有角色:
剪切'
role_name
':剪切角色。复制 '
role_name
' : 复制角色。Paste: Pastes a role from the clipboard. Dimmed if the clipboard is empty.
Edit '
role_name
': Opens the role editor.Edit '
role_name
' in New Tab: Currently not implemented.Copy SQL to Clipboard: Currently not implemented.
Delete '
role_name
': Removes the role.Remove Figure '
role_name
': Currently not implemented.
Role tab.
The Role tab of the role editor includes
the Name field with a default value
consisting of role
+
(x
x
is an incremental number
starting at 1). Each role also appears in the
Roles group, which represents the
hierarchical relationship among the defined roles. The
Parent drop-down list enables you to
share the privileges of an existing role with descendent
roles.
To rename a role, double-click the role name to reopen the role editor. Then edit the text in the Name field.
Privileges tab. A newly created role might include the privileges of a parent role. However, if no parent role was provided, the Objects and Privileges groups are empty. To add an object and define privileges for it, drag the object icon from the Schema Privileges panel to the Objects group and then select the object to show a list of valid privileges. Grant an individual privilege by selecting the check box for it or click Check all Privileges to select all of the rights.
下图显示了具有、、
和
为角色
选择的模式
中的film
表对象。sakila
INDEX
INSERT
SELECT
TRIGGER
role1