MySQL Workbench: Users and Privileges

The Users and Privileges tab of MySQL Workbench allows you to administer users and their respective privileges for the MySQL instance.

To display the Users and Privileges tab, click Users and Privileges on the Management tab:

Screenshot of the Management tab

You should see a screen similar to this:

Screenshot of the Users and Privileges tab using the MySQL Workbench GUI

The Users and Privileges screen displays a list of all users, along with relevant details for each account. Here, an administrator can create new user accounts, set their password, authentication type, their administrative roles, and schema privileges, if any.

Clicking on the various buttons will display their respective tabs.

The Account Limits Tab

Screenshot of the Account Limits tab

This tab allows you to set limits on:

According to the MySQL documentation:

Any statement that a client can issue counts against the query limit, unless its results are served from the query cache. Only statements that modify databases or tables count against the update limit.

The Administrative Roles Tab

Screenshot of the Administrative Roles tab

The Administrative Roles tab allows you to apply a role (or roles) for each user. DBA is the highest role — a DBA can perform all tasks. Other roles are more specific to a particular task (or set of tasks) that a user might be allowed to perform. You can also set the Global Privileges in this screen. In the above screenshot, the user has full access to all options. When you create a new user, you might only allow a small number of options for that user. For example, you might restrict one user to only being able to perform SELECT, INSERT, and UPDATE statements, while another might be able to perform DELETE and even DROP statements in addition to those.

It's good practice to limit user privileges and roles to the bare minimum that the user needs. Never grant a user account more access than it needs. Privileges can always be added later if required.

The Schema Privileges Tab

Screenshot of the Schema Privileges tab

The Schema Privileges tab is used for adding schema privileges to a user account. This enables that user to perform the given actions based on the rights given to them in this screen.