MySQL---> Rights management principles and settings

Source: Internet
Author: User
MySQL Rights management MySQL permissions check principle
  • Two stages of permission checking
    1. Do you have permission to link up
    2. Do you have permission to perform this operation
  • How does the server determine if the user has permission to connect?
    • Through the user table under MySQL Library
    • View: Select Host,user,password from User;
  • The server determines if you have permission to perform this operation
    • Through the DB table and Tables_priv table under the MYSQ library
    • After the user is judged, the DB table is judged to determine if there is a library operation right
    • And check if Tables_priv has the right to operate a table.
  • Set User: Grant [Permissions 1, Permissions 2, permissions 3] on . to user @ "host" identified by ' password '
    • Permissions are: All,create,drop,insert,delete,update,select
    • . Represents all tables for all databases
  • Flush privileges; Because user this table is already loaded into memory, so modify to flush permissions

MySQL---> Rights management principles and settings

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.