Documentation Home
MySQL Workbench Manual
Related Documentation Download this Manual
PDF (US Ltr) - 17.0Mb
PDF (A4) - 17.0Mb

MySQL Workbench Manual  /  ...  /  The Schema Privileges Panel The Schema Privileges Panel

The Schema Privileges panel has the following sections, used to create users for your schemas and to define roles:

  • Users

  • Roles

The following figure displays the Schema Privileges section of the MySQL Model tab.

Figure 9.7 Roles and Privileges

Content is described in the surrounding text. Adding Users

To add a user, double-click the Add User icon. This creates a user with the default name user1. Double-clicking this user opens the user editor docked at the bottom of the application.

In the User Editor, set the user name and password using the Name and Password fields. Assign one role or a number of roles to the user by selecting the desired roles from the field on the right and then clicking <. Roles may be revoked by moving them in the opposite direction.

Right-clicking a user opens a context menu. The items in the menu function as described in Section, “Adding Roles and Object Privileges”. Adding Roles and Object Privileges

To add a role, double-click the Add Role icon. This action creates a role with the default name role1 in the Roles area of the Schema Privileges panel and opens the role editor. The editor has two tabs located at the bottom of the editor: Role and Privileges.

To open a context menu with the following actions, right-click an existing role:

  • Cut 'role_name': Cuts the role.

  • Copy 'role_name': Copies the role.

  • 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.

The following figure shows the film table object from the sakila schema with INDEX, INSERT, SELECT, and TRIGGER selected for the role1 role.

Figure 9.8 Role Editor

Content is described in the surrounding text.