JAEN

SQL

GRANT

CautionGrant privileges

GRANT SELECT ON db.table TO 'user'@'host';

Grants privileges — least privilege always; app users never need DROP.

Examples

  • GRANT SELECT, INSERT, UPDATE ON app.* TO 'webapp'@'10.0.%';Minimal app grants

Syntax

GRANT <privs> ON <db.obj> TO 'user'@'host';

Before you run it

Over-granting invites disasters.

Related commands

The same reference, with no signal at all

Every command on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).

Get it free on the App Store