ubuntu connect mysql as root code example
Example 1: mysql change root mysql_native_password
UPDATE
mysql.user
SET
plugin = 'mysql_native_password',
Password = PASSWORD('')
WHERE
User = 'root';
Example 2: how to login to mysql as normal user in ubuntu
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON database_name.* TO 'newuser'@'localhost';