MySQL Rights management MySQL permissions check principle
- Two stages of permission checking
- Do you have permission to link up
- 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