Difference between revisions of "MySQL"

From Useful Things
Jump to: navigation, search
Line 13: Line 13:
 
= Removing a user entirely =
 
= Removing a user entirely =
 
<syntaxhighlight lang="mysql">
 
<syntaxhighlight lang="mysql">
drop user {user_name}@'%';
+
drop user {database_user}@'%';
 
</syntaxhighlight>
 
</syntaxhighlight>

Revision as of 02:24, 25 June 2014

Adding a user

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


Revoking privileges

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


Removing a user entirely

drop user {database_user}@'%';