mysql failed to login as root@localhost
snippet in sql

mysql failed to login as root@localhost

user1814

UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE user = 'root' AND plugin = 'unix_socket';
FLUSH PRIVILEGES;