Difference between revisions of "Users"

From MyWiki
Jump to: navigation, search
 
Line 2: Line 2:
 
GRANT [type of permission] ON [database name].[table name] TO ‘[username]’@'localhost’;<br>
 
GRANT [type of permission] ON [database name].[table name] TO ‘[username]’@'localhost’;<br>
 
REVOKE [type of permission] ON [database name].[table name] FROM ‘[username]’@‘localhost’;<br>
 
REVOKE [type of permission] ON [database name].[table name] FROM ‘[username]’@‘localhost’;<br>
DROP USER ‘demo’@‘localhost’;
+
DROP USER ‘demo’@‘localhost’;<br>
 +
Change a users password :  SET PASSWORD FOR 'user-name-here'@'hostname-name-here' = PASSWORD('new-password-here');

Latest revision as of 14:00, 10 August 2015

grant ALL on <database>. to '<username>'@'<hostname>' identified by '<password>'
GRANT [type of permission] ON [database name].[table name] TO ‘[username]’@'localhost’;
REVOKE [type of permission] ON [database name].[table name] FROM ‘[username]’@‘localhost’;
DROP USER ‘demo’@‘localhost’;
Change a users password : SET PASSWORD FOR 'user-name-here'@'hostname-name-here' = PASSWORD('new-password-here');