# SET PASSWORD

Sets a user’s password.

## Syntax

```sql
SET PASSWORD FOR 'username'@'host' = PASSWORD('password')

```

## Remarks

* `'password'` is a clear-text password. The `PASSWORD` function creates a hash of the clear-text password and assigns it to the user.
* This command allows users to change their own password. You can change another user’s password with this command if you have`SUPER` or `ALTER USER` privilege.
* This command only changes the user’s password for that specific node, not for every node in the cluster.
* Refer to the [Permissions Matrix](https://docs.singlestore.com/db/v9.1/reference/sql-reference/security-management-commands/permissions-matrix.md) for the required permissions.
* Refer to [Configuring a Password Policy](https://docs.singlestore.com/db/v9.1/security/authentication/configuring-a-password-policy.md) for details on how to configure a robust password policy.

> **📝 Note**: Once the password is changed, it cannot be viewed.

## Examples

```sql
SET PASSWORD FOR 'joe'@'%' = PASSWORD('securePass');

```

To unset a password:

```sql
SET PASSWORD FOR 'joe'@'%' = PASSWORD('');
```

***

Modified at: February 25, 2026

Source: [/db/v9.1/reference/sql-reference/security-management-commands/set-password/](https://docs.singlestore.com/db/v9.1/reference/sql-reference/security-management-commands/set-password/)

(An index of the documentation is available at /llms.txt)
