MariaDB/SQL/ALTER: Difference between revisions

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
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..."
 
No edit summary
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}}''': {{fmt/arg|username}} {{fmt/arg/opt|authentication option}}
: {{fmt/arg|user spec}} [, ''repeat...'']
* '''{{fmt/arg|TLS option}}''': ''one of &ndash;''
: [<code>REQUIRE</code> {<code>NONE</code> | {{fmt/arg|TLS option}} [[<code>AND</code>] ''repeat...'']}]
** <code>IDENTIFIED BY</code> '{{fmt/arg|password}}'
: [<code>WITH</code> {{fmt/arg|resource option}} [''repeat...'']]
** <code>IDENTIFIED BY PASSWORD</code> '{{fmt/arg|password hash}}'
: {{fmt/arg/opt|lock option}} {{fmt/arg/opt|password option}}
** <code>IDENTIFIED</code> {<code>VIA</code>|<code>WITH</code>} {{fmt/arg|authentication rule}} [<code>OR</code> ''repeat...'']
 
* '''{{fmt/arg|resource option}}''': ''one of &ndash;''
{| class="wikitable sortable"
** <code>MAX_QUERIES_PER_HOUR</code> {{fmt/arg|count}}
! argument name || value(s)
** <code>MAX_UPDATES_PER_HOUR</code> {{fmt/arg|count}}
|-
** <code>MAX_CONNECTIONS_PER_HOUR</code> {{fmt/arg|count}}
| valign=top | '''{{fmt/arg|user spec}}''' || {{fmt/arg|username}} {{fmt/arg/opt|authentication option}}
** <code>MAX_USER_CONNECTIONS</code> {{fmt/arg|count}}
|-
** <code>MAX_STATEMENT_TIME</code> {{fmt/arg|time}}
| valign=top | '''{{fmt/arg|TLS option}}''' || ''one of &ndash;''
* '''{{fmt/arg|lock option}}''': ''one of &ndash;''
* <code>IDENTIFIED BY</code> '{{fmt/arg|password}}'
** <code>ACCOUNT LOCK</code>
* <code>IDENTIFIED BY PASSWORD</code> '{{fmt/arg|password hash}}'
** <code>ACCOUNT UNLOCK</code>
* <code>IDENTIFIED</code> {<code>VIA</code>|<code>WITH</code>} {{fmt/arg|authentication rule}} [<code>OR</code> ''repeat...'']
* '''{{fmt/arg|password option}}''': ''one of &ndash;''
|-
** <code>PASSWORD EXPIRE</code>
| valign=top | '''{{fmt/arg|resource option}}''' || ''one of &ndash;''
** <code>PASSWORD EXPIRE DEFAULT</code>
* <code>MAX_QUERIES_PER_HOUR</code> {{fmt/arg|count}}
** <code>PASSWORD EXPIRE NEVER</code>
* <code>MAX_UPDATES_PER_HOUR</code> {{fmt/arg|count}}
** <code>PASSWORD EXPIRE INTERVAL N DAY</code>
* <code>MAX_CONNECTIONS_PER_HOUR</code> {{fmt/arg|count}}
* '''{{fmt/arg|authentication rule}}''': ''one of &ndash;''
* <code>MAX_USER_CONNECTIONS</code> {{fmt/arg|count}}
** {{fmt/arg|authentication plugin}}
* <code>MAX_STATEMENT_TIME</code> {{fmt/arg|time}}
** {{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|lock option}}''' || ''one of &ndash;''
* '''{{fmt/arg|authentication plugin}}''': ''one of &ndash;''
* <code>ACCOUNT LOCK</code>
** {{fmt/arg|authentication plugin}} {<code>USING</code>|<code>AS</code>} '{{fmt/arg|authentication string}}'
* <code>ACCOUNT UNLOCK</code>
** {{fmt/arg|authentication plugin}} {<code>USING</code>|<code>AS</code>} <code>PASSWORD('</code>{{fmt/arg|password}}<code>')</code>
|-
| valign=top | '''{{fmt/arg|password option}}''' || ''one of &ndash;''
* <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 &ndash;''
* {{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 &ndash;''
* {{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

Template:Fmt/title

Syntax

ALTER USER [IF EXISTS]

Template:Fmt/arg [, repeat...]
[REQUIRE {NONE | Template:Fmt/arg [[AND] repeat...]}]
[WITH Template:Fmt/arg [repeat...]]
Template:Fmt/arg/opt Template:Fmt/arg/opt
argument name value(s)
Template:Fmt/arg Template:Fmt/arg Template:Fmt/arg/opt
Template:Fmt/arg one of –
Template:Fmt/arg one of –
Template:Fmt/arg one of –
  • ACCOUNT LOCK
  • ACCOUNT UNLOCK
Template:Fmt/arg one of –
  • PASSWORD EXPIRE
  • PASSWORD EXPIRE DEFAULT
  • PASSWORD EXPIRE NEVER
  • PASSWORD EXPIRE INTERVAL N DAY
Template:Fmt/arg one of –
Template:Fmt/arg one of –