Change The Password On mysql User
1. Get Terminal/windows cmd and type this command to login the mysql terminal.
mysql -u <username> -p<password>
2. Run this command.
SELECT user,authentication_string,plugin,host FROM mysql.user; (output is below)
3. Run this sql command for change the password.
ALTER USER '<username>'@'localhost' IDENTIFIED WITH mysql_native_password BY '<password>';
ex: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123';
5. Then run to this FLUSH PRIVILEGES; command for reload the grant tables and put your new changes into effect.
Tags:
mysql