All Products
Search
Document Center

Manage user accounts and databases

Last Updated: Aug 07, 2020

Before you manage user accounts and databases, log on to the Alibaba Cloud official website. Go to the TSDB console and select the target instance.

Account type

TSDB for InfluxDB® supports two types of database accounts: administrator and standard accounts. You can manage all accounts and databases in the console. For more information about the specific permissions of an account, see Accounts and permissions.

Account type Description
Administrator You can create and manage an administrator account in the console only.
You can create only one administrator account for each instance. The administrator account can manage all databases on the instance.
The administrator account cannot create new accounts or manage other accounts.
The administrator account has all permissions on all databases of the instance for which the account is created.
Standard account You can create and manage standard accounts in the console only.
You can create multiple standard accounts for each instance.
A standard account cannot create new accounts or manage other accounts.
You must grant permissions on specific databases to standard accounts in the console.
A standard account can perform read and write operations on the database that this account is authorized to manage.

Manage accounts

Create an account

  1. On the Accounts page, click Create.

The following figure shows the Accounts page.Accounts

  1. On the Create page that appears, set the account name and its password.

The following figure shows how to create an administrator account.Admin

The following figure shows how to create a standard account.standard

  • You can create an administrator account or a standard account. You can create only one administrator account for each TSDB for InfluxDB® instance.
  • The account name must be up to 16 characters in length, and can contain lowercase letters, digits, and underscores (_). It must start with a letter and end with a letter or digit.
  • The password must be 8 to 32 characters in length and, can contain three of the following types: uppercase letters, lowercase letters, digits, and special characters. Special characters include exclamation points (!), at signs (@), number signs (#), dollar signs ($), percent signs (%), carets (^), ampersands (&), asterisks (*), parentheses (), underscores (_), plus signs (+), hyphens (-), and equal signs (=).

After the db_test account is created, the following page appears.

Permission

Delete an account

On the Accounts page, find the target account and click Delete.Delete

Manage databases

Create a database

  1. On the Databases page, click Create.

Create database

  1. On the Create page that appears, enter the database name. After the mydb database is created, the following page appears.

RP

By default, the retention policy for a new database is autogen. In this policy, the initial retention period is 0s, which indicates that data is permanently stored. You can click Storage Policy Management to modify the retention policy or create a new retention policy for the database.

Create a retention policy

On the Storage Policy Management page, click Create.

Policy

Create retention policy oneday and set the retention period to 1 day.

OneDay

Modify the current retention policy

If you want to change the retention period in retention policy autogen to 2 hours, click Modify.

modify

Set the retention period to 2 hours.

database storage policy

Set the default retention policy

A retention policy specifies the retention period of data stored in TSDB for InfluxDB®. If no retention policy is specified when you read or write data, the default retention policy takes effect.

set default

Delete a database

On the Databases page, find the target database and click Delete.delete database

Permission management

You can change the read and write permissions on databases for a specified standard account.

permission manage

For example, you can grant read and write permissions on database mydb, as shown in the following figure.

database permission

Administrator permissions

The administrator has all permissions on databases.

Accounts and permissions

Account type Authorization type Object Permission
Standard account Read and Write permissions Database SHOW DATABASES USE (DATABASE)
Data operation SELECT INSERT DELETE (FROM) CARDINALITY SHOW TAG KEY (EXACT) CARDINALITY
SHOW TAG VALUES (EXACT) CARDINALITY SHOW FIELD KEY (EXACT) CARDINALITY SHOW MEASUREMENT (EXACT) CARDINALITY SHOW TAG KEYS SHOW TAG VALUES
SHOW FIELD KEYS SHOW QUERIES EXPLAIN (ANALYZE)
Time series SHOW SERIES DROP SERIES DROP SERIES
Continuous query CREATE CONTINUOUS QUERY DROP CONTINUOUS QUERY SHOW CONTINUOUS QUERIES
Measurement SHOW MEASUREMENTS SHOW MEASUREMENT (EXACT) CARDINALITY
Retention policy SHOW RETENTION POLICIES DROP RETENTION POLICY

InfluxDB® is a trademark registered by InfluxData, which is not affiliated with, and does not endorse, TSDB for InfluxDB®.