I\'m trying to update the password for a database user using the command line, and it\'s not working for me. This is the code I\'m using:
mysql> UPDATE user S
Before MySQL 5.7.6 this works from the command line:
mysql -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('$w0rdf1sh');"
I don't have a mysql install to test on but I think in your case it would be
mysql -e "UPDATE mysql.user SET Password=PASSWORD('$w0rdf1sh') WHERE User='tate256';"
This works for me. Got solution from MYSQL webpage
In MySQL run below queries:
FLUSH PRIVILEGES;
ALTER USER 'root'@'localhost' IDENTIFIED BY 'New_Password';
In windows 10, just exit out of current login and run this on command line
--> mysqladmin -u root password “newpassword”
where instead of root could be any user.
As of MySQL 8.0.18 This works fine for me
mysql> SET PASSWORD FOR 'user'@'localhost' = 'userpassword';
Note: u should login as root user
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('your password');
this is the updated answer for WAMP v3.0.6
UPDATE mysql.user
SET authentication_string=PASSWORD('MyNewPass')
WHERE user='root';
FLUSH PRIVILEGES;