Help Databases and objects

User Manager

The User Manager lists the server’s user accounts and lets you create, rename and delete them, set their passwords and limits, grant or revoke privileges at every level, and, on servers that have them, manage roles. Everything it does is ordinary CREATE USER, GRANT, REVOKE and related statements, run with your own connection’s rights.

Opening it

Press Ctrl+U, or choose Tools > User Manager.

Your database user needs to read the privilege tables in the mysql database, and to have the rights to change accounts. Without the first, bonSQL says it cannot retrieve the information it needs and the User Manager does not open.

The layout

Account details

Select the account itself in the tree to see:

FieldWhat it is
Username / HostThe account name and the host it may connect from. % means any host. Changing either and saving renames the account.
Password / Retype PasswordType a new password in both to change it. Leave them as they are to keep the current one.
PluginThe authentication plugin, from the plugins active on the server. It can be changed on MySQL newer than 5.7.0 and MariaDB newer than 10.4.0; on MySQL 5.6 it can be chosen only when creating an account. Elsewhere it is greyed out.
Role (no password)Ticked for a role. It can only be set when creating an account.
Four Maximum number of … fieldsQueries, updates and connections per hour, and simultaneous connections. 0 means no limit. Shown when the server supports them.

Privileges

Select Global Privileges for privileges on the whole server, or an object under Object Level Privileges for privileges on that database, table, view, column or routine. Tick a privilege to grant it, untick it to revoke it. Select/Deselect All does the whole list. Selecting a folder rather than an object shows Note - Please select an object to GRANT/REVOKE privileges.

The list comes from the server itself (SHOW PRIVILEGES), so it shows exactly what your server has: MariaDB’s privileges such as DELETE HISTORY and BINLOG ADMIN, and MySQL 8’s dynamic ones such as BACKUP_ADMIN. Each object level offers only the privileges that apply to it. An account’s current global privileges are read with SHOW GRANTS. GRANT in the list is the grant option. SQLyog Community used a fixed list, which missed privileges added in newer servers.

Roles

On MariaDB 10.0.5 and later and MySQL 8.0 and later, the tree has a Roles node. It lists every role on the server; tick a role to grant it to the selected account, untick it to revoke it. A role can be granted to another role.

After granting a role to an account that is not itself a role, bonSQL makes the role usable at once:

To create a role, click Add New User, tick Role (no password) and enter a name. On MariaDB a role has no host. MySQL has no separate role flag, so bonSQL counts a locked account with no password as a role.

Buttons

ButtonDoes
Add New UserClears the fields for a new account; Save Changes becomes Create and Cancel Changes becomes Cancel. The host starts as %.
Delete UserDeletes the selected account after asking you to confirm.
Save ChangesApplies everything changed since the last save.
Cancel ChangesPuts the fields back as they were.
CloseCloses the User Manager, asking first if there are unsaved changes.
HelpOpens this page.

After deleting or renaming an account, bonSQL runs FLUSH PRIVILEGES.

When it does not work