Outdated Version

You are viewing an older version of this section. View current production version.

ALTER USER

Info

MemSQL Helios does not support this command.

Alters settings associated with the user. Only the default resource pool setting and the SSL connection requirement setting can be changed. To change a user password, use the SET PASSWORD command.

Syntax

ALTER USER user[@host] [IDENTIFIED BY 'password'] [SET DEFAULT RESOURCE POOL = poolname] [REQUIRE {SSL | NONE}]

Arguments

  • user: The name of the user.
  • host: The host that the user can connect from. For example, specifying 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: An optional database connection password.
  • poolname: The new default resource pool.
  • REQUIRE: SSL option ensures that the user connects via SSL. NONE specifies that SSL will not be required for the connection.

Examples

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;

The following example requires SSL on the user db_mgr:

ALTER USER 'db_mgr' REQUIRE SSL;