Syntax:
ALTER USER syntax for MySQL 5.7.6 and higher:

The ALTER USER statement modifies MySQL accounts. It provides control
over account password expiration. As of MySQL 5.7.6, it also provides
control over authentication, SSL/TLS, and resource-limit properties,
and account locking and unlocking.

To use ALTER USER, you must have the global CREATE USER privilege or
the UPDATE privilege for the mysql database. When the read_only system
variable is enabled, ALTER USER additionally requires the SUPER
privilege.

An error occurs if you try to modify an account that does not exist.

As of MySQL 5.7.8, the IF EXISTS clause can be used, which causes the
statement to produce a warning for each named account that does not
exist, rather than an error.

ALTER USER modifies the mysql.user table row for each affected account
according to the options specified in the statement. Unspecified
properties retain their current values.

Example 1: Change an account's password and expire it. As a result, the
user must connect with the named password and choose a new one at the
next connection:

ALTER USER 'jeffrey'@'localhost'
  IDENTIFIED BY 'new_password' PASSWORD EXPIRE;

Example 2: Modify an account to use the sha256_password authentication
plugin and the given password. Require that a new password be chosen
every 180 days:

ALTER USER 'jeffrey'@'localhost'
  IDENTIFIED WITH sha256_password BY 'new_password'
  PASSWORD EXPIRE INTERVAL 180 DAY;

Example 3: Lock or unlock an account:

ALTER USER 'jeffrey'@'localhost' ACCOUNT LOCK;
ALTER USER 'jeffrey'@'localhost' ACCOUNT UNLOCK;

Example 4: Require an account to connect using SSL and establish a
limit of 20 connections per hour:

ALTER USER 'jeffrey'@'localhost'
  REQUIRE SSL WITH MAX_CONNECTIONS_PER_HOUR 20;

URL: http://dev.mysql.com/doc/refman/5.7/en/alter-user.html

