Manage Database Users

Add a Database User


While a SingleStoreDB Cloud user can log into the SingleStore portal and run SQL commands via the SQL Editor, the same SingleStoreDB Cloud username cannot be used to log into a database from a third-party SQL client or development tool.

To log into a SingleStoreDB Cloud database from a third-party SQL client or development tool, you must first add a database user.

As a workspace's admin user is not always a log-in option for all organization members, SingleStore recommends adding a separate database user for each organization member.


If you have invited another SingleStoreDB Cloud user to join your organization, please refrain from adding a database user with the same SingleStoreDB Cloud username until after the invitation has been accepted.

Alternatively, you may create a database user with a different username than the SingleStoreDB Cloud username, though this may make user management more challenging as additional organization members are added.

Use the GRANT command to add a database user.

GRANT <grant_options> TO '<user>'@'<host>' IDENTIFIED BY '<password>'

For example:

GRANT SELECT, INSERT ON db.* TO 'username'@'%' IDENTIFIED BY 'password'

Refer to GRANT for more information.

Change a Database User Password

The database admin password is configured when the workspace is first created. This is also referred to as the “Master Username” in the portal, which is admin by default.

To change this password, navigate to the workspace name in the left nav > Workspace Overview > User Access. Click the Reset button next to the Password field and follow the provided instructions.

Note: You must have SUPER privileges to change another user’s password using the GRANT command.

Use the SET PASSWORD command to change a database user's password. A database user can also use this command to change their own password.

SET PASSWORD FOR 'username'@'host' = PASSWORD('password');

Remove a Database User

To remove a database user, use the DROP USER command.

DROP USER '<user>'@'<host>'

Inspect Database User Permissions

You can view grants and permissions by querying information_schema.user_privileges.

You can also view grants for a user by running SHOW GRANTS:

SHOW GRANTS FOR user@domain;