how to set password new mysql command line code example
Example 1: set password mysql
-- In case the UPDATE command returns "Column 'Password' is not updatable" run
ALTER USER 'root'@'localhost' IDENTIFIED BY 'newPassword';
flush privileges;
Example 2: how to change mysql localhost password
ALTER USER 'root'@'localhost' IDENTIFIED BY 'NewPassword'
Example 3: How to pass password to mysql command line
mysqladmin processlist -u root -pYOURPASSWORDHERE
No space between your password and the -p