SHOW USERS;
taos> SHOW USERS;
name | super | enable | sysinfo | create_time |
================================================================================
root | 1 | 1 | 1 | 2022-09-07 11:09:05.717 |
Query OK, 1 rows in database (0.002492s)
CREATE USER weijian PASS ‘123456’ SYSINFO 1;
taos> CREATE USER weijian PASS '123456' SYSINFO 1;
Query OK, 0 of 0 rows affected (0.000644s)
taos> SHOW USERS;
name | super | enable | sysinfo | create_time |
================================================================================
weijian | 0 | 1 | 1 | 2022-09-08 15:45:43.188 |
root | 1 | 1 | 1 | 2022-09-07 11:09:05.717 |
Query OK, 2 rows in database (0.004649s)
ALTER USER weijian PASS ‘456789’;
ALTER USER weijian ENABLE 0;
ALTER USER weijian SYSINFO 0;
taos> ALTER USER weijian PASS '456789';
Query OK, 0 of 0 rows affected (0.000591s)
taos> ALTER USER weijian ENABLE 0;
Query OK, 0 of 0 rows affected (0.003619s)
taos> ALTER USER weijian SYSINFO 0;
Query OK, 0 of 0 rows affected (0.003626s)
taos> SHOW USERS;
name | super | enable | sysinfo | create_time |
================================================================================
weijian | 0 | 0 | 0 | 2022-09-08 15:45:43.188 |
root | 1 | 1 | 1 | 2022-09-07 11:09:05.717 |
Query OK, 2 rows in database (0.003528s)
taos>
taos> exit
taos -u weijian -p
taos -p
[root@iZ2ze30dygwd6yh7gu6lskZ ~]# taos -u weijian -p
Enter password: Welcome to the TDengine Command Line Interface, Client Version:3.0.0.1
Copyright (c) 2022 by TDengine, all rights reserved.
Server is Community Edition.
taos> exit
[root@iZ2ze30dygwd6yh7gu6lskZ ~]# taos -p
Enter password: Welcome to the TDengine Command Line Interface, Client Version:3.0.0.1
Copyright (c) 2022 by TDengine, all rights reserved.
Server is Community Edition.
taos> exit
DROP USER weijian;
taos> DROP USER weijian;
Query OK, 0 of 0 rows affected (0.000756s)
taos> SHOW USERS;
name | super | enable | sysinfo | create_time |
================================================================================
root | 1 | 1 | 1 | 2022-09-07 11:09:05.717 |
Query OK, 1 rows in database (0.001342s)
GRANT ALL ON test.* TO weijian;
REVOKE WRITE ON test.* FROM weijian;
taos> GRANT ALL ON test.* TO weijian;
Query OK, 0 of 0 rows affected (0.000712s)
taos> REVOKE WRITE ON test.* FROM weijian;
Query OK, 0 of 0 rows affected (0.000622s)
觉得好,就一键三连呗(点赞+收藏+关注)