ubuntu 安装mysql出现ERROR 1698 (28000): Access denied for user 'root'@'localhost'问题的解决方法

$ sudo mysql -u root # I had to use "sudo" since is new installation

mysql> USE mysql;
mysql> UPDATE user SET plugin='mysql_native_password' WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> exit;

$ service mysql restart

你可能感兴趣的:(ubuntu 安装mysql出现ERROR 1698 (28000): Access denied for user 'root'@'localhost'问题的解决方法)