mysql only login with sudo code example
Example 1: 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';
Example 2: how to login to mysql as normal user in ubuntu
mysql -u newuser -p