mysql 5.7 user addition and authority management

Create a new user
create user read_user@'192.168.10.%' identified by'read123';

Modify user password
alter user read_user@'192.168.10.%' identified by'read123456';

Permission list
ALL
SELECT, INSERT UPDATE CREATE DROP RELOAD

with grant option

授权命令
grant all on . to read_user@'192.168.10.%' identified by 'read123' with grant option;

Grant permissions on the role target to the user identified by'read123' with grant option;

Authorization requirements
1 Create an administrator user who can manage the database through 10 network segments.
Grant all on . To root@'192.168.10.%' identified by'root123' with grant option;

2 Create an application user, you can SELECT, INSERT, UPDATE, DELETE through 10 network segments, all tables under the erp library.
grant SELECT, INSERT, UPDATE, DELETE on erp.* to erp@'192.168.10.%' identified by'erp123' with grant option;

3. Create a read-only user
grant SELECT on . To readuser@'192.168.10.%' identified by'read123' with grant option;

Guess you like

Origin blog.51cto.com/14995121/2547711