locked from root and can't change privileges on another user
This solution belongs to the previous version of MySQL.
By logging in to MySQL using socket authentication, you can do it.

sudo mysql -u root


Then the following command could be run. 

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';