change password db mysql localhost code example
Example 1: change mysql password from command line
ALTER USER 'root'@'localhost' IDENTIFIED BY 'New-Password';
Example 2: mysql change password
UPDATE mysql.user SET authentication_string=PASSWORD("rootpass") WHERE User='root';