grant Verified current stable Not installed? Security

Grant / Grant Authorities To User

Grant Authorities To User

Grants specific permissions to a user for a designated object in the system.

$
Terminal
grant <action_list> on <object_type> <object_name> to user <username>;

When To Use

When delegating access rights in a multi-user environment.

Pro Tip

Verify granted permissions immediately with 'show grants for {{username}}' to prevent privilege escalation.

Command Builder

Tune the command before you copy it

Back to syntax
$
Generated Command
grant <action_list> on <object_type> <object_name> to user <username>;

Anatomy of Output

Understanding the result

Granting permissions for '{{username}}'. Grant Status

Confirms the initiation of the permission grant.

Privileges granted: SELECT, INSERT on TABLE my_table to '{{username}}'. Detail Output

Detailed information about granted permissions.

Success: Permissions have been successfully granted to '{{username}}'. Success Message

Final confirmation of the operation.

Troubleshooting

Common pitfalls

ERROR: Invalid action specified.

Solution: Check the action list for typos or unsupported actions.

ERROR: Object '{{object_name}}' does not exist.

Solution: Verify the object name exists in the specified schema.

ERROR: User '{{username}}' does not exist.

Solution: Verify that the username is correctly spelled and exists.

Command Breakdown

What each part is doing

grant
Base Command
The executable that performs this operation. Here it runs Grant before the shell applies any redirect operators.
<action_list>
action list
The value supplied for action list.
<object_type>
object type
The value supplied for object type.
<object_name>
object name
The value supplied for object name.
<username>
username
The user value supplied to this command.

Alternative Approaches

Comparable commands in other tools

Alternative security tools for the same job.