Difference between revisions of "SQL"

From Hack Sphere Labs Wiki
Jump to: navigation, search
(SQL Reset Password of User)
(SQL Reset Password of User)
 
Line 8: Line 8:
 
  FLUSH PRIVILEGES;
 
  FLUSH PRIVILEGES;
 
  exit
 
  exit
 +
 +
*http://blog.marceloaltmann.com/en-change-user-password-on-mysql-pt-trocando-a-senha-do-usuario-no-mysql/

Latest revision as of 15:42, 10 October 2013

SQL Reset Password of User

mysql -u root -p

SQL

SET PASSWORD FOR 'user'@'host' = PASSWORD('newpass');

or

UPDATE mysql.user SET Password=PASSWORD('newpass') WHERE User='user' AND Host='host';

then

FLUSH PRIVILEGES;
exit