mysql user permission settings

// Create user
CREATE user '[username]' @ 'localhost' (Local Access Only) / '[username]' @ '%' (can access external) IDENTIFIED BY '[password]';
// CRUD authorized users and table creation privileges
. GRANT SELECT, INSERT, UPDATE, DELETE, cREATE ON [ database name] * (* indicates that under the authorization scope for all database tables) TO [user name];
// immediately enable modification
FLUSH pRIVILEGES;
// all rights to cancel all the user's database (tables) authorized
REVOKE ALL ON * * FROM [user name];.
// delete user
dELETE FROM mysql.user WHERE user = '[username]';

text: https: / /blog.csdn.net/xie_sining/article/details/80714463

Guess you like

Origin www.cnblogs.com/cw828/p/11142164.html