MySQL User and Rights management

Source: Internet
Author: User

1, users connect to MySQL, and make a variety of inquiries, the user right you are the limit of the check
1, for MySQL you have no permission to connect up, must meet the following three parameters:
1. Where do you come from? : Host

2. Who are you? : User
1, add a User:
Command format: Grant [Permissions 1, Permissions 2, Permissions 3] on * * to [email protected] identified by password
2. View the permissions of a user:
SELECT * from user where user=root \g;
3, Recovery rights:
Revoke [Permissions] on * * FROM [email protected];
4. Permission level:
User (global), DB (Library), table (level)
View Hierarchy Permissions: SELECT * Form User/db/table_priv \g;
3. Your password? : Password
1, change the password:
1. Update user Set Password = password (' 111111 ') where user = root;
Flush privileges;
4. These three messages are stored in the user table in the MySQL database
5, UPDATE permissions: Flush privileges;
2. Do you have permission to perform this operation
: SELECT * from user where user = ' user_name ' \g;

Related Article

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.