mysql how to reset passwords with a few commands -
mysql how to reset passwords with a few commands
The commands below will help you reset any mysql user password.
update user set password=PASSWORD('thenewpass') where User='theusername';
- The first line says to use the "mysql" database which contains all the user info.
- the second update line sets the new password "thenewpass" for the user "theusername".
- the third line flushes privileges this is necessary otherwise the new password will not work or actually be applied.