Users and Databases
Last updated
Last updated
HEAVY.AI has a default superuser named admin
with default password HyperInteractive
.
When you create or alter a user, you can grant superuser privileges by setting the is_super
property.
You can also specify a default database when you create or alter a user by using the default_db
property. During login, if a database is not specified, the server uses the default database assigned to that user. If no default database is assigned to the user and no database is specified during login, the heavyai
database is used.
For more information about users, roles, and privileges, see .
The following are naming convention requirements for HEAVY.AI objects, described in notation:
A NAME is [A-Za-z_][A-Za-z0-9\$_]*
A DASHEDNAME is [A-Za-z_][A-Za-z0-9\$_\-]*
An EMAIL is ([^[:space:]\"]+|\".+\")@[A-Za-z0-9][A-Za-z0-9\-\.]*\.[A-Za-z]+
User objects can use NAME, DASHEDNAME, or EMAIL format.
Role objects must use either NAME or DASHEDNAME format.
Database and column objects must use NAME format.
HEAVY.AI accepts (almost) any string enclosed in optional double quotation marks as the user name.
password
User's password.
is_super
Set to true if user is a superuser. Default is false.
default_db
User's default database on login.
can_login
Set to true (default/implicit) to activate a user.
When false, the user still retains all defined privileges and configuration settings, but cannot log in to HEAVY.AI. Deactivated users who try to log in receive the error message "Unauthorized Access: User is deactivated."
Examples:
Example:
HEAVY.AI accepts (almost) any string enclosed in optional double quotation marks as the old or new user name.
password
User's password.
is_super
Set to true if user is a superuser. Default is false.
default_db
User's default database on login.
can_login
Set to true (default/implicit) to activate a user.
When false, the user still retains all defined privileges and configuration settings, but cannot log in to HEAVY.AI. Deactivated users who try to log in receive the error message "Unauthorized Access: User is deactivated."
Example:
Database names cannot include quotes, spaces, or special characters.
owner
User name of the database owner.
Example:
Example:
To alter a database, you must be the owner of the database or an HeavyDB superuser.
Example:
Enable super users to change the owner of a database.
Change the owner of my_database
to user Joe
:
Changes ownership of database objects (tables, views, dashboards, etc.) from a user or set of users to a different user. When the ALL keyword is specified, ownership change would apply to database objects across all databases. Otherwise, ownership change only applies to database objects in the current database.
Example: Reassign database objects owned by jason
and mike
in the current database to joe
.
Example: Reassign database objects owned by jason
and mike
across all databases to joe
.
Database object ownership changes only for objects within the database; ownership of the database itself is not affected. You must be a superuser to run this command.
See in for a database security example.