mysql.server start --skip-grant-tables

이렇게 뜨면 제대로 된 것이다
mysql -u root

mysql>
이런식으로 뜨면 root유저로 MySQL에 접속된 것
use mysql;

FLUSH PRIVILEGES;

ALTER USER 'root'@'localhost' IDENTIFIED BY '변경하고 싶은 비밀번호 이곳에 입력';

EXIT;
mysql.server stop
--skip-grant-tables 옵션이 들어간 MySQL 서버를 멈춰준다
mysql.server start

mysql -u root -p

https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html