Difference between revisions of "MariaDB/SQL/ALTER"
Jump to navigation
Jump to search
| 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| | + | | valign=top | '''{{fmt/arg|user spec}}''' || {{fmt/arg|username}} {{fmt/arg/opt|auth option}} |
|- | |- | ||
| − | | valign=top | '''{{fmt/arg| | + | | valign=top | '''{{fmt/arg|auth option}}'''<br>(authentication option) || ''one of –'' |
* <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
|
"ALTER" SQL statement
|
Related
- This modifies users created by CREATE.
Reference
Syntax
Note: The following is incomplete.
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> [ <auth option> ] |
| <auth option> (authentication option) |
one of –
|
| <resource option> | one of –
|
| <lock option> | one of –
|
| <password option> | one of –
|
| <authentication rule> | one of –
|
| <authentication plugin> | one of –
|
Example
ALTER USER 'rc-bot'@localhost IDENTIFIED BY 'YourPassword!';- Note that the syntax