Mysqladmin -u root -p password “newpassword”.
To change a password for an existing user via mysqladmin
in MySQL, you can use the following command:
mysqladmin -u <username> -p password <newpassword>
Replace <username>
with the username of the user whose password you want to change, and <newpassword>
with the new password you want to set. After running this command, you will be prompted to enter the current password for the specified user. Enter the current password and press Enter. If the current password is correct, the new password will be set.