MySQL

From Useful Things
Revision as of 02:13, 25 June 2014 by Milosivanovic (talk | contribs) (Created page with "= MySQL = == Adding a user == <syntaxhighlight lang="mysql"> grant all privileges on {database_name}.* to {database_user}@'%' identified by 'their_password'; </syntaxhighlight...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

MySQL

Adding a user

grant all privileges on {database_name}.* to {database_user}@'%' identified by 'their_password';

Revoking privileges

revoke usage on {databse_name}.* from 'user'@'%';

Removing a user entirely

drop user {user_name}@'%';