賦予 收回 查詢許可權

2022-05-29 11:24:12 字數 1382 閱讀 2981

grant privileges [(columns)] on database.table to 'username'@'hostname' [identified by [password] 'password'] [,'username'@'hostname' [identified by [password] 'password']][with with_option [with_option]] with 關鍵字後面的引數 1.grant option 將自己的許可權授予其他使用者 2.max_queries_per_hour count 設定每小時最多可以執行多少次count查詢 3.max_updates_per_hour count 設定每小時最多可以執行多少次count更新 4.max_connections_per_hour count 設定沒小時最大的連線數量 5.max_user_connections 設定每個使用者最大的建立連線數

授予user4有insert許可權

grant insert on *.* to 'user4'@'localhost';

建立乙個具有insert和select許可權的 user4普通使用者密碼為123

grant insert,select on *.* to 'user4'@'localhost' identified by '123' with grant option;

//查詢賬戶許可權

show grants for 'user4'@'localhost'\g

收回許可權

收回insert許可權

revoke insert on *.* from 'user4'@'localhost';

許可權一覽表

常用1.create,drop 建立/刪除資料庫、表、索引

2.insert,delete,update,select 對資料庫中的資料進行增刪改查操作

3.index 可以建立或刪除索引,適用於所有的表

4.alter 可以用於修改表的結構或重新命名表

5.grant 允許為其他使用者授權,可用於資料庫和表

6.file 被賦予該許可權的使用者能讀寫mysql伺服器上的任何檔案。

SQL許可權授予和收回

grant select 把查詢student表的許可權授給使用者ui on table student to ui grant select on table student to public with grant option revoke select 收回許可權 on table sc f...

Hbase許可權控制配置及收回許可權

1.hbase的許可權管理需要配置哪些配置檔案?2.hbase提供的安全管控級別包括哪些?3.使用哪個命令可實現在hbase中賦值許可權?4.如何收回許可權?hbase的許可權管理依賴協協處理器。所以我們需要配置hbase.security.authorization true,以及hbase.co...

賦予使用者dba許可權

已知被賦予許可權的使用者名為 batch 第一步 登陸 sqlplus nolog sql conn as sysdba 第二步 查詢所有使用者名稱,可以找到batch使用者 sql select username from dba users 第三步 賦予許可權 sql grant dba to ...