mysql recover root password code example
Example 1: how to change mysql localhost password
ALTER USER 'root'@'localhost' IDENTIFIED BY 'NewPassword'
Example 2: alter user root mysql
ALTER USER 'root'@'localhost' IDENTIFIED BY 'newPassword';
Example 3: remove root password mysql
mysqladmin -u root -pType_in_your_current_password_here password ''