Description
This statement performs the following operations:
Change the password of an ApsaraDB for OceanBase user.
Change the encryption method for an ApsaraDB for OceanBase user connection.
Note
To run this command, you must have the UPDATE USER permission.
Syntax
- Change the password of a user.
ALTER USER username IDENTIFIED BY password;
- Changes the encryption mode for a user connection.
ALTER USER user REQUIRE {NONE | SSL | x509 | tls_option_list}
tls_option_list:
tls_option
| tls_option_list tls_option
tls_option:
CIPHER str_value
| ISSUER str_value
| SUBJECT str_value
Parameter description
| Parameter | Description |
|---|---|
| REQUIRE | Specifies the encryption protocol. |
Examples
- Change the password of the sqluser01 user to abc123.
ALTER USER sqluser01 IDENTIFIED BY abc123;
- Change the encryption protocol for the user connection to SSL.
ALTER USER sqluser REQUIRE SSL;