change password root mysql windows code example
Example 1: mysql admin u root p password change password
#Change or update mysql root password
#Go to win cmd and cd into C:\Program Files\MySQL\MySQL Server 8.0\bin
#Then type in the following: (password - current root password)
mysqladmin -u root -p password newpass
Example 2: mysql set root password
use mysql;
update user set authentication_string=PASSWORD("mynewpassword") where User='root';
flush privileges;
quit