privilege_sysinfo.sim 1.7 KB
Newer Older
1 2 3 4 5
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
sql connect

S
Shengliang Guan 已提交
6 7 8 9 10
print =============== create user and login
sql create user sysinfo0 pass 'taosdata'
sql create user sysinfo1 pass 'taosdata'
sql alter user sysinfo0 sysinfo 0
sql alter user sysinfo1 sysinfo 1
11
sql create database db
S
Shengliang Guan 已提交
12 13 14 15 16 17 18 19 20 21 22

print user sysinfo0 login
sql close
sql connect sysinfo0

print =============== check oper
sql_error create user u1 pass 'u1'
sql_error drop user sysinfo1
sql_error alter user sysinfo1 pass '1'
sql_error alter user sysinfo0 pass '1'

23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
sql_error create dnode $hostname port 7200
sql_error drop dnode 1

sql_error create qnode on dnode 1
sql_error drop qnode on dnode 1

sql_error create mnode on dnode 1
sql_error drop mnode on dnode 1

sql_error create snode on dnode 1
sql_error drop snode on dnode 1

sql_error redistribute vgroup 2 dnode 1 dnode 2
sql_error balance vgroup

sql_error kill transaction 1
sql_error kill connection 1
sql_error kill query 1

print =============== check db
43 44 45 46 47
sql_error create database d1
sql_error drop database db
sql_error use db
sql_error alter database db replica 1;
sql_error show db.vgroups
X
Xiaoyu Wang 已提交
48 49
sql_error select * from information_schema.ins_stables where db_name = 'db'
sql_error select * from information_schema.ins_tables where db_name = 'db'
50 51

print =============== check show
X
Xiaoyu Wang 已提交
52
sql_error select * from information_schema.ins_users
53
sql_error show cluster
X
Xiaoyu Wang 已提交
54
sql_error select * from information_schema.ins_dnodes
X
Xiaoyu Wang 已提交
55
sql_error select * from information_schema.ins_mnodes
56
sql_error show snodes
X
Xiaoyu Wang 已提交
57
sql_error select * from information_schema.ins_qnodes
58 59 60 61
sql_error show bnodes
sql_error show grants
sql_error show dnode 1 variables;
sql show variables;
S
Shengliang Guan 已提交
62

63
system sh/exec.sh -n dnode1 -s stop -x SIGINT