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
No edit summary
No edit summary
Line 2: Line 2:
==Related==
==Related==
* This modifies users created by {{l/same|CREATE}}.
* This modifies users created by {{l/same|CREATE}}.
==Reference==
* [https://mariadb.com/kb/en/alter-user/ MariaDB Knowledge Base]
==Syntax==
==Syntax==
'''Note''': The following is incomplete.
<code>ALTER USER</code> [<code>IF EXISTS</code>]
<code>ALTER USER</code> [<code>IF EXISTS</code>]
: {{fmt/arg|user spec}} [, ''repeat...'']
: {{fmt/arg|user spec}} [, ''repeat...'']
Line 12: Line 16:
! argument name || value(s)
! argument name || value(s)
|-
|-
| valign=top | '''{{fmt/arg|user spec}}''' || {{fmt/arg|username}} {{fmt/arg/opt|authentication option}}
| valign=top | '''{{fmt/arg|user spec}}''' || {{fmt/arg|username}} {{fmt/arg/opt|auth option}}
|-
|-
| valign=top | '''{{fmt/arg|TLS option}}''' || ''one of &ndash;''
| valign=top | '''{{fmt/arg|auth option}}'''<br>(authentication option) || ''one of &ndash;''
* <code>IDENTIFIED BY '</code>{{fmt/arg|password}}<code>'</code>
* <code>IDENTIFIED BY '</code>{{fmt/arg|password}}<code>'</code>
* <code>IDENTIFIED BY PASSWORD '</code>{{fmt/arg|password hash}}<code>'</code>
* <code>IDENTIFIED BY PASSWORD '</code>{{fmt/arg|password hash}}<code>'</code>
Line 45: Line 49:
* {{fmt/arg|authentication plugin}} {<code>USING</code>|<code>AS</code>} <code>PASSWORD('</code>{{fmt/arg|password}}<code>')</code>
* {{fmt/arg|authentication plugin}} {<code>USING</code>|<code>AS</code>} <code>PASSWORD('</code>{{fmt/arg|password}}<code>')</code>
|}
|}
==Example==
* <syntaxhighlight inline lang=SQL>ALTER USER 'rc-bot'@localhost IDENTIFIED BY 'YourPassword!';</syntaxhighlight>
**  Note that the syntax

Revision as of 03:18, 17 February 2025

Template:Fmt/title

Reference

Syntax

Note: The following is incomplete.

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
(authentication option)
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 –

Example

  • ALTER USER 'rc-bot'@localhost IDENTIFIED BY 'YourPassword!';
    • Note that the syntax