python許可權授權 MySQL授權(使用者許可權)

2021-10-11 19:43:03 字數 1246 閱讀 1777

一、mysql查詢與許可權

(二)授權

使用者管理:

設定使用者密碼

前期準備工作:

停止服務

將配置檔案當中的skip-grant-tables刪除掉

重啟服務:

執行修改命令

檢視使用者狀態(如果資料過多,用\g可以規範布局)

select user,host, authentication_string from user;

常規登入:

簡單登入:

**許可權設定:**

使用者:使用系統的賬號,身份

許可權:可被允許操作的範圍

組:針對使用者許可權的集合

授權使用者:

建立使用者

create user abc@localhost;建立abc使用者,允許本地的登陸

create user abc@'%.%.%.%'; 建立abc使用者,允許所有使用者登陸

建立使用者並設定密碼:

create user abc@localhost identified by '123';

刪除使用者

drop user abc@」%.%.%.%」

授權:常規許可權

----select 查詢

---- insert 插入

----update 更新

-----delete 刪除

-----create 建立

grant command on databases.table to user@host;

對指定使用者的指定ip登陸授權操作指定的資料庫的表相應許可權

授權abc本地登陸擁有school庫student表的查詢許可權

grant select on school.student to abc@'localhost';

授權abc192.168.10.10登陸擁有school庫student表的id欄位的查詢許可權

grant select(id) on school.student to abc@'192.168.10.10';

授權abc192.168.10.10登陸擁有school庫student表的查詢和插入許可權

grant select,insert on school.student to abc@'192.168.10.10';

授權abc192.168.10.10登陸擁有school庫所有表的查詢和插入許可權

grant select,insert on school.* to abc@'192.168.10.10';

python許可權授權 Python包裝授權

1 什麼是包裝 coding utf 8 包裝類,就是給被包裝的類加個殼 被包裝內實現殼的內部,而包裝內提供殼的外部 介面 有點類似於繼承關係,不過也不完全時,因為通過繼承也可以實現包裝效果,不使用繼承同樣可以實現包裝效果。下面通過乙個例子來展示 包裝的概念 class packagelist ob...

mysql授權使用者許可權 mysql授權使用者許可權

grant 普通資料使用者,查詢 插入 更新 刪除 資料庫中所有表資料的權利。grant select on testdb.to common user grant insert on testdb.to common user grant update on testdb.to common us...

mysql授權以及許可權管理

1 建立使用者 create user 使用者名稱 ip位址 identified by 密碼 語法 create user 使用者名稱 localhost identified by 密碼 本地可用賬號 create user 使用者名稱 192.168.12.1 identified by 密碼...