github.com/matrixorigin/matrixone@v0.7.0/test/distributed/cases/zz_accesscontrol/drop_account.sql (about) 1 --env prepare statement 2 drop account if exists drop_account_01; 3 drop account if exists drop_account_02; 4 drop account if exists drop_account_03; 5 drop account if exists drop_account_04; 6 drop account if exists drop_account_05; 7 drop database if exists drop_acc_db_1; 8 9 --drop account 存在/不存在,if exists不存在/存在,覆盖`` 10 create account drop_account_01 ADMIN_NAME 'root' IDENTIFIED BY '1234567890'; 11 select account_name from mo_catalog.mo_account where account_name='drop_account_01'; 12 drop account drop_account_01; 13 drop account drop_account_02; 14 select account_name from mo_catalog.mo_account where account_name='drop_account_01'; 15 create account if not exists drop_account_03 ADMIN_NAME 'root' IDENTIFIED BY '1234567890'; 16 drop account drop_account_03; 17 drop account if exists drop_account_03; 18 select account_name from mo_catalog.mo_account where account_name='drop_account_03'; 19 create account drop_account_04 ADMIN_NAME 'root' IDENTIFIED BY '1234567890'; 20 drop account `drop_account_04`; 21 22 --异常:drop sys,语法错误 23 drop account sys; 24 drop accout abc; 25 drop account if not exists abc; 26 drop account exists abc; 27 drop account ''; 28 29 --account下创建用户,role,db,table。。后drop account 30 create account drop_account_05 ADMIN_NAME 'admin' IDENTIFIED BY '12345'; 31 -- @session:id=2&user=drop_account_05:admin&password=12345 32 create role drop_acc_role_1; 33 create database drop_acc_db_1; 34 create table drop_acc_db_1.drop_acc_tb_1(a int); 35 insert into drop_acc_db_1.drop_acc_tb_1 values (20); 36 create user drop_acc_user_1 identified by '1111' default role drop_acc_role_1; 37 grant select ,insert ,update on table drop_acc_db_1.* to drop_acc_role_1 with grant option; 38 -- @session 39 40 drop account if exists drop_account_01; 41 drop account if exists drop_account_02; 42 drop account if exists drop_account_03; 43 drop account if exists drop_account_04; 44 drop account if exists drop_account_05; 45 drop database if exists drop_acc_db_1;