mysql reset root password is not complicated, but reset at each version is slightly different way, is the method under the 5.7.26 version are listed below.
1 Close mysql database
ps -ef | grep mysqld
kill -9 pid ## there is need to kill the two processes
2 Start mysql, plus --skip-grant-tables option, the following command to switch to the line mysql installation directory under the bin directory.
./mysqld_safe --skip-grant-tables
3 landing mysql, mysql database switch to
./mysql -uroot
use mysql
4 Change mysql root password, refresh permission
update user set authentication_string=password('********') where user='root' and host='localhost';
flush privileges;
5 Close mysql database, normal restart, you can log in with the new password.