Difference between revisions of "MariaDB/SQL/ALTER"
Jump to navigation
Jump to search
(Created page with "==Related== * This modifies users created by {{l/same|CREATE}}. ==Syntax== <code>ALTER USER</code> [<code>IF EXISTS</code>] {{fmt/arg|user spec}} [, ''repeat...''] [<code>REQU...") |
|||
Line 1: | Line 1: | ||
+ | {{fmt/title|"ALTER" SQL statement}} | ||
==Related== | ==Related== | ||
* This modifies users created by {{l/same|CREATE}}. | * This modifies users created by {{l/same|CREATE}}. | ||
==Syntax== | ==Syntax== | ||
− | <code>ALTER USER</code> [<code>IF EXISTS</code>] {{fmt/arg|user spec}} [, ''repeat...''] [<code>REQUIRE</code> {<code>NONE</code> | {{fmt/arg|TLS option}} [[<code>AND</code>] ''repeat...'']} [<code>WITH</code> {{fmt/arg|resource option}} [''repeat...'']] {{fmt/arg/opt|lock option}} {{fmt/arg/opt|password option}} | + | <code>ALTER USER</code> [<code>IF EXISTS</code>] |
− | + | : {{fmt/arg|user spec}} [, ''repeat...''] | |
− | + | : [<code>REQUIRE</code> {<code>NONE</code> | {{fmt/arg|TLS option}} [[<code>AND</code>] ''repeat...'']}] | |
− | + | : [<code>WITH</code> {{fmt/arg|resource option}} [''repeat...'']] | |
− | + | : {{fmt/arg/opt|lock option}} {{fmt/arg/opt|password option}} | |
− | + | ||
− | + | {| class="wikitable sortable" | |
− | + | ! argument name || value(s) | |
− | + | |- | |
− | + | | valign=top | '''{{fmt/arg|user spec}}''' || {{fmt/arg|username}} {{fmt/arg/opt|authentication option}} | |
− | + | |- | |
− | + | | valign=top | '''{{fmt/arg|TLS option}}''' || ''one of –'' | |
− | + | * <code>IDENTIFIED BY</code> '{{fmt/arg|password}}' | |
− | + | * <code>IDENTIFIED BY PASSWORD</code> '{{fmt/arg|password hash}}' | |
− | + | * <code>IDENTIFIED</code> {<code>VIA</code>|<code>WITH</code>} {{fmt/arg|authentication rule}} [<code>OR</code> ''repeat...''] | |
− | + | |- | |
− | + | | valign=top | '''{{fmt/arg|resource option}}''' || ''one of –'' | |
− | + | * <code>MAX_QUERIES_PER_HOUR</code> {{fmt/arg|count}} | |
− | + | * <code>MAX_UPDATES_PER_HOUR</code> {{fmt/arg|count}} | |
− | + | * <code>MAX_CONNECTIONS_PER_HOUR</code> {{fmt/arg|count}} | |
− | + | * <code>MAX_USER_CONNECTIONS</code> {{fmt/arg|count}} | |
− | + | * <code>MAX_STATEMENT_TIME</code> {{fmt/arg|time}} | |
− | + | |- | |
− | + | | valign=top | '''{{fmt/arg|lock option}}''' || ''one of –'' | |
− | + | * <code>ACCOUNT LOCK</code> | |
− | + | * <code>ACCOUNT UNLOCK</code> | |
− | + | |- | |
+ | | valign=top | '''{{fmt/arg|password option}}''' || ''one of –'' | ||
+ | * <code>PASSWORD EXPIRE</code> | ||
+ | * <code>PASSWORD EXPIRE DEFAULT</code> | ||
+ | * <code>PASSWORD EXPIRE NEVER</code> | ||
+ | * <code>PASSWORD EXPIRE INTERVAL N DAY</code> | ||
+ | |- | ||
+ | | valign=top | '''{{fmt/arg|authentication rule}}''' || ''one of –'' | ||
+ | * {{fmt/arg|authentication plugin}} | ||
+ | * {{fmt/arg|authentication plugin}} {<code>USING</code>|<code>AS</code>} <code>'</code>{{fmt/arg|authentication string}}<code>'</code> | ||
+ | * {{fmt/arg|authentication plugin}} {<code>USING</code>|<code>AS</code>} <code>PASSWORD('</code>{{fmt/arg|password}}<code>')</code> | ||
+ | |- | ||
+ | | valign=top | '''{{fmt/arg|authentication plugin}}''' || ''one of –'' | ||
+ | * {{fmt/arg|authentication plugin}} {<code>USING</code>|<code>AS</code>} '{{fmt/arg|authentication string}}' | ||
+ | * {{fmt/arg|authentication plugin}} {<code>USING</code>|<code>AS</code>} <code>PASSWORD('</code>{{fmt/arg|password}}<code>')</code> | ||
+ | |} |
Revision as of 03:03, 17 February 2025
"ALTER" SQL statement
|
Related
- This modifies users created by CREATE.
Syntax
ALTER USER
[IF EXISTS
]
- <user spec> [, repeat...]
- [
REQUIRE
{NONE
| <TLS option> [[AND
] repeat...]}] - [
WITH
<resource option> [repeat...]] - [ <lock option> ] [ <password option> ]
argument name | value(s) |
---|---|
<user spec> | <username> [ <authentication option> ] |
<TLS option> | one of –
|
<resource option> | one of –
|
<lock option> | one of –
|
<password option> | one of –
|
<authentication rule> | one of –
|
<authentication plugin> | one of –
|