Documentation Home
MySQL Workbench Manual
Related Documentation Download this Manual
PDF (US Ltr) - 16.4Mb
PDF (A4) - 16.4Mb
HTML Download (TGZ) - 14.7Mb
HTML Download (Zip) - 14.8Mb

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 schemata and to define roles —:

  • Users

  • Roles

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

Figure 9.4 Roles and Privileges

Content is described in the surrounding text. Adding Roles

To add a role, double-click the Add Role icon. This creates a role with the default name role1. Right-clicking a role opens a pop-up menu with the following items:

  • Cut 'role_name': Cuts the role

  • Copy 'role_name': Copies the role

  • Edit Role...: Opens the role editor

  • Edit in New Window...: Opens the role editor in a new editor window

  • Delete 'role_name': Removes the role

  • Copy SQL to Clipboard: Currently not implemented

To rename a role, click the role name. Then you will be able to edit the text.

All defined roles are listed under Roles on the left side of the role editor. Double-clicking a role object opens the role editor docked at the bottom of the page.

Figure 9.5 Role Editor

Content is described in the surrounding text.

Select the role to which you wish to add objects. You may drag and drop objects from the Physical Schemas to the Objects section of the role editor. To assign privileges to a role, select it from the Roles section, then select an object in the Objects section. In the Privileges section, check the rights you wish to assign to this role. For example, a web_user role might have only SELECT privileges and only for database objects exposed through a web interface. Creating roles can make the process of assigning rights to new users much easier. 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's 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 the < button. Roles may be revoked by moving them in the opposite direction.

Right-clicking a user opens a pop-up menu. The items in the menu function as described in Section, “Adding Roles”.