Difference between revisions of "SQL"

From Hack Sphere Labs Wiki
Jump to: navigation, search
(Created page with "=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='us...")
 
(SQL Reset Password of User)
Line 5: Line 5:
 
or
 
or
 
  UPDATE mysql.user SET Password=PASSWORD('newpass') WHERE User='user' AND Host='host';
 
  UPDATE mysql.user SET Password=PASSWORD('newpass') WHERE User='user' AND Host='host';
 +
then
 
  FLUSH PRIVILEGES;
 
  FLUSH PRIVILEGES;
 
  exit
 
  exit

Revision as of 15:41, 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