一、人大金仓Kingbase数据库
1.创建只读账户
revoke create on schema public from public; createuser readertest withpassword'123456'; grantusageonschema public to readertest; grantselectonalltablesinschema public to readertest; alterdefaultprivilegesinschema public grantselectontablesto readertest; |
2.创建普通用户
Create user xx connection limit - 1 password 'xx'; alter user xx SUPERUSER; alter user xx CREATEDB; alter user xx CREATEROLE; alter user xx LOGIN; |
二、Oracle数据库
/*第1步:创建临时表空间 */ |
三、MySQL数据库
create user 'test'@'%'identified by 'test@2024'; grant select on *.* to 'test'@'%'; flush privileges; |
四、clickhouse数据库
-- 创建用户 CREATE USER myuser IDENTIFIED BY 'mypassword'; -- 授予所有数据库的读写权限 GRANT ALL ON *.* TO myuser; -- 只授予特定数据库的读写权限 GRANT SELECT, INSERT, UPDATE, DELETE ON database_name.* TO myuser; |
五、gbase数据库
-- 创建新用户 CREATE USER 'newuser'@'%' IDENTIFIED BY 'password'; -- 授权新用户在特定数据库上的特定权限 GRANT SELECT, INSERT, UPDATE ON mydatabase.* TO 'newuser'@'%'; -- 刷新权限,使授权生效 FLUSH PRIVILEGES; |
六、达梦数据库
--创建用户 create user “TEST” identified by “password”; --授权 grant “PUBLIC”,“RESOURCE”,“SOI”,“VTI” to “TEST”; –授权查询其他模式下的所有表 |