Table access between users and account locking and unlocking

Source: Internet
Author: User

I. Table access between users:

For example, if the wangzihu user wants to access the users table of the System user, the command is as follows: grant select on users to wangzihu; (this is the command executed by the user for the system, in this case, if you are a wangzihu user, you can only query the users table data in the System user. If you want to add, delete, modify, and query the data in the system table, run the following command: grant all on users to wangzihu; note: When you query tables in the System user in the wangzihu user, you must add system, for example, select * from system. users;

Ii. account locking and unlocking

Profile Overview: specifies the maximum number of times and days that a user can enter a password when logging on to the account. For example, specify that a wangzihu user attempts to log on three times at most, and the number of days that the account is locked is 2 days) create SQL command: create profile wangzihu_lock limit failed_login_attempts 3 password_lock_time 2; B) Execute SQL command: Alter user wangzihu profile wangzihu_lock; account unlock SQL command: Alter user wangzihu account unlock;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.