ubuntu change mysql root password code example
Example 1: mysql set root password
use mysql;
update user set authentication_string=PASSWORD("mynewpassword") where User='root';
flush privileges;
quit
Example 2: mysql change root mysql_native_password
UPDATE
mysql.user
SET
plugin = 'mysql_native_password',
Password = PASSWORD('')
WHERE
User = 'root';