資料庫許可權管理和維護

2021-06-22 14:18:36 字數 528 閱讀 2806

﹙1﹚             賦許可權

1﹚ 對普通使用者的查詢刪除grant select,insert, update, delete, execute  on database.* to 『user』@』hostname』 identifiedby 『password』

2﹚ 對資料庫開發人員需要許可權:」create(建立),alter(修改) ,drop(刪除),reference(外來鍵), create temporary tables(建立臨時表許可權), index(索引), createview(建立檢視),show view(展示檢視), 」

﹙2﹚             收回許可權

1﹚ revoke all on database.* from 『user』@』hostname』

﹙3﹚             保護選項檔案以阻止其他使用者讀取

1﹚ 選項檔案在資料庫就是my.ini檔案

2﹚ windows實現用資源管理器實現

3﹚ linux用語句%  chmod 600 .my.cnf等語句實現

資料庫 許可權管理

許可權管理,授權操作只能以root操作 select from mysql.user g 檢視擁有user許可權的使用者 create user 使用者名稱 localhost identified by 密碼 新增之後再檢視就有了。預設造出來的在user表裡沒有任何許可權。select from ...

資料庫 許可權管理

建立賬號 create user mpd localhost identified by 123 mysql umpd p123 可以在本地登陸 create user nicexm identified by 123 h 服務端ip 可以遠端連線mysql伺服器 給使用者授權 user 許可權最高...

資料庫許可權管理

建立使用者 create user zhang3identified by 123123 預設host是 create user zhang3 localhost identifiedby 123456 刪除使用者 drop user li4 預設刪除host為 的使用者 執行完delete命令後要...