1.建立乙個使用者名為test密碼為passwd的使用者
create user t with encrypted password 'passwd';
2.使用者唯讀事務
alter user test set default_transaction_read_only=on;
3.把所有庫的語言的usage許可權給到readonly
grant usage on schema public to test;
4.授予select許可權(這句要進入具體資料庫操作在哪個db環境執行就授予那個db的權)
grant select on all tables in schema public to test
建立唯讀使用者
1.建立乙個使用者名為readonly密碼為123456的使用者 create user readonly with encrypted password 123456 2.更新使用者預設為唯讀事務 alter user readonly set default transaction read o...
Pg資料庫新增唯讀使用者。
今天pg資料庫需要新增乙個唯讀使用者,由於在pgadmin4中無法新增,遂用sql新增,遇到了乙個大坑,很基礎的問題,只怪自己學藝不精,一次提醒自己 注意 postgresql資料庫對大小寫不敏感!create user test2 with encrypted password test2 alt...
Oracle資料建立唯讀使用者
記得授權完成後重新登入使用者,不然也會遇到許可權不足的一些問題 建立乙個使用者 create user test identified by 123456授予連線許可權 grant connect to test 授予只能查詢的許可權 授權所有表的唯讀許可權 grant select any tab...