1, find the mysql configuration file to add the following configuration my.conf
#忽略验证
skip-grant-tables
2, restart mysql
sudo systemctl restart mysql
3, it can be directly connected mysql connection
4, change passwords
#选中mysql数据库
use mysql
#修改密码 这个可以根据你想修改的用户选择性修改 看你自己吧
update user set password=password('Xuan5201314) where user="root";
5, refresh permission, this step is very important
flush privileges;
6, delete the my.conf just added skip-grant-tables
7, the next restart mysql on the line
sudo systemctl restart mysql
8, difficulties can comment on (a letter will be back) Hsuan micro letter 17382121839