(一)、忽略密码
mysql出现ERROR1698(28000):Access denied for user root@localhost错误解决方法
在ubuntu的terminal(也即终端)上输入sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf,进入到这个配置文件,
然后在这个配置文件中的[mysqld]这一块中加入skip-grant-tables这句话。 

(二)、修改密码
2、执行use mysql;
3、执行update user set host = '%' where user = 'root';
4、执行FLUSH PRIVILEGES;
看下账号密码
select user, plugin from user;

(三)、改完还登陆不进去
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
输入这个
update user set plugin='mysql_native_password' where user='root';