Watch the 7.3 Webinar On-Demand
This new release brings updates to Universal Storage, query
optimization, and usability that you won’t want to miss.
Alters settings associated with the user. To change a user password, use the SET PASSWORD command.
ALTER USER user[@host] [IDENTIFIED BY 'password'] [ACCOUNT UNLOCK]
[SET [DEFAULT RESOURCE POOL = poolname] [FAILED_LOGIN_ATTEMPTS = integer] [PASSWORD_LOCK_TIME = integer]]
[REQUIRE {SSL | NONE}]
localhost
means the user account can be used only when connecting from the local host. If no host is explicitly specified, the %
wildcard will be used, which allows the user to connect from any host.PASSWORD_LOCK_TIME
, specifies the failed login attempt lockout behavior. FAILED_LOGIN_ATTEMPTS
is the number of failed attempts allowed before the account is locked out. Default is 0
which means there is no restriction. When set to a value >=1, PASSWORD_LOCK_TIME
must also be specified.FAILED_LOGIN_ATTEMPTS
, specifies the failed login attempt lockout behavior. PASSWORD_LOCK_TIME
is the number of seconds a locked out account must wait before reattempting to log in.SSL
option ensures that the user connects via SSL. NONE
specifies that SSL will not be required for the connection.For more information about failed login attempt lockout behavior, see Securing SingleStore DB.
The following example demonstrates how to add a new user with a resource pool, and then change the resource pool.
CREATE USER joe WITH DEFAULT RESOURCE POOL = general;
ALTER USER joe SET DEFAULT RESOURCE POOL = executive;
ALTER USER joe ACCOUNT UNLOCK;
The following example requires SSL on the user db_mgr:
ALTER USER 'db_mgr' REQUIRE SSL;