User Tools

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’;

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information