MariaDB/SQL/GRANT: Difference between revisions
from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
m →Example: backticks |
No edit summary |
||
| Line 6: | Line 6: | ||
==Example== | ==Example== | ||
* <syntaxhighlight inline lang=SQL>GRANT ALL ON `roundcube`.* to 'rc-bot'@localhost;</syntaxhighlight> | * <syntaxhighlight inline lang=SQL>GRANT ALL ON `roundcube`.* to 'rc-bot'@localhost;</syntaxhighlight> | ||
* <syntaxhighlight inline lang=SQL>GRANT ALL PRIVILEGES ON `woozdev-mw`.* TO 'wooz-dev-mw'@'localhost' IDENTIFIED BY '</syntaxhighlight>{{arg|password}}<code>'</code>; | |||
==Syntax== | ==Syntax== | ||
* <code>GRANT</code> {{fmt/arg|priv list}} <code>ON</code> {{fmt/arg|object type}} {{fmt/arg|priv level}} <code>TO</code> {{fmt/arg|user spec}} [ {{fmt/arg|user options}} ] | * <code>GRANT</code> {{fmt/arg|priv list}} <code>ON</code> {{fmt/arg|object type}} {{fmt/arg|priv level}} <code>TO</code> {{fmt/arg|user spec}} [ {{fmt/arg|user options}} ] | ||
Latest revision as of 01:59, 26 April 2026
Related
Template:L/samenegates privileges granted byGRANT.Template:L/samelists privileges granted byGRANT. (seeTemplate:L/same)
Reference
Example
GRANT ALL ON `roundcube`.* to 'rc-bot'@localhost;GRANT ALL PRIVILEGES ON `woozdev-mw`.* TO 'wooz-dev-mw'@'localhost' IDENTIFIED BY 'Template:Arg';
Syntax
GRANTTemplate:Fmt/argONTemplate:Fmt/arg Template:Fmt/argTOTemplate:Fmt/arg [ Template:Fmt/arg ]- Template:Fmt/arg: Template:Fmt/arg Template:Fmt/arg/opt [, repeat...]
- Template:Fmt/arg: one of –
USAGEALL[PRIVILEGES]
- Template:Fmt/arg: one of –
TABLEFUNCTIONPROCEDUREPACKAGEPACKAGE BODY
- Template:Fmt/arg: one of –
- Template:Fmt/arg: one of –
- Template:Fmt/arg: one of –
IDENTIFIED BY'Template:Fmt/arg'IDENTIFIED BY PASSWORD'password_hash'IDENTIFIED{VIA|WITH} Template:Fmt/arg [OR repeat...]
- Template:Fmt/arg: one of –
REQUIRE{NONE| Template:Fmt/arg [[AND] repeat...]- [
WITHTemplate:Fmt/arg [repeat...]
- Template:Fmt/arg: one of –
GRANT OPTION- Template:Fmt/arg
GRANTTemplate:Fmt/argTOTemplate:Fmt/arg [, repeat...] [WITH ADMIN OPTION]
