MySQL update password of a user

Below is the script which can be used to update the password of any existing user:

Connect to MySQL via sudo mysql command on your MySQL instance

sudo mysql

Run the password update script:

ALTER USER ‘<YourUser>’@’localhost’ IDENTIFIED BY ‘<YourPassword>‘;