User Tools

Site Tools


mysql

This is an old revision of the document!


mysql

Add a user

source

CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
FLUSH PRIVILEGES;

Grant multiple permissions

GRANT [type of permission] ON [database name].[table name] TO ‘[username]’@'localhost’;

Revoke permissions

REVOKE [type of permission] ON [database name].[table name] FROM ‘[username]’@‘localhost’

Delete user

DROP USER ‘demo’@‘localhost’;

mysql.1616502383.txt.gz · Last modified: (external edit)