Mysql installation path: C: Program Files\ mysql \ mysql Server 5.7bin

Mysql grants permissions to users, databases, etc.

Mysql -u root -p mysql -u root -p mysql -u root -p mysql -u root -p mysql -u root -p mysql -u root -p mysql -u root -p mysql -u root -p

Mysql > grant database permission to add a test user with password 123456, which can log in from any host (if you can only log in from a certain IP address, you need to change % to this IP address), and query database automonitor. Modify, and delete the function of the grant, the select, insert, update, and delete on automonitor. * to test @ “%” identified by the “123456”; flush privileges;

Grant all PRIVILEGES on AUTOMonitor.* to test@"%" identified by "123456"; flush privileges;Copy the code

Authorize a table in the database

Grant select on automonitor.ncp_base_station to test@"%"; grant select on automonitor.ncp_base_station to test@"%";Copy the code

4. Revoke permissions

Revoke all privileges on *.* from test@"%"; Revoke select ON automonitor.ncp_base_station from test@"%";Copy the code

Drop user username @ ‘%’