alter user root mysql 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: change mysql password from command line
ALTER USER 'root'@'localhost' IDENTIFIED BY 'New-Password';
Example 3: alter user root mysql
ALTER USER 'root'@'localhost' IDENTIFIED BY 'newPassword';