使用者之間表的訪問和賬戶的鎖定與解鎖

來源:互聯網
上載者:User

一:使用者之間表的訪問:

例如:wangzihu使用者想訪問system使用者中的users表,命令如下:  grant select on users to wangzihu;(這是在使用者為system下所執行的命令,此時如果在wangzihu使用者下只能查詢system使用者中users表的資料)如果想對system表中的資料進行增刪改查則可以執行如下命令:grant all on users to wangzihu;注意:在wangzihu使用者中進行查詢system使用者中的表時,必須要加上system,例如:Select * from system.users;

二:賬戶的鎖定與解鎖

賬戶鎖定(profile)概述:指定該賬戶登陸時最多可以輸入密碼的次數和天數例如:指定wangzihu使用者最多嘗試3次登陸,鎖定的天數為2天a)建立sql命令:  create profile wangzihu_lock limit failed_login_attempts 3 password_lock_time 2;b)執行sql命令: alter  user  wangzihu  profile  wangzihu_lock;賬戶解鎖 Sql命令:alter  user  wangzihu  account  unlock;

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.