Outdated Version

You are viewing an older version of this section. View current production version.

GRANT

Create a user account with the specified privileges.

GRANT priv_type ON priv_level
    TO user_specification [, user_specification] ...
    WITH GRANT OPTION
    [REQUIRE {SSL | NONE}]

user_specification:
    user
    [
        IDENTIFIED BY [PASSWORD] 'password'
    ]

priv_level:
    *
  | *.*
  | database.*

priv_type:
    SELECT
  | INSERT
  | UPDATE
  | DELETE
  | CREATE
  | DROP
  | REFERENCES
  | ALTER
  | SHOW DATABASES
  | SUPER
  | LOCK TABLES
  | REPLICATION
  | CREATE USER

Notes

  • user_specification - user specification
  • priv_level - privilege level
  • priv_type - privilege type
  • This command can be run on any MemSQL node
Info

MemSQL Community Edition only allows the creation of new users with root permissions.

Example

GRANT ALL ON *.* TO 'memsql_admin'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;