Zkuste toto:
mysql -u root -h 127.0.0.1 -p
Enter password: (enter the random password here)
Ref:https://dev.mysql .com/doc/refman/5.7/en/data-directory-initialization-mysqld.html
Poté můžete resetovat své heslo pomocí ALTER USER 'root'@'localhost' IDENTIFIED BY 'new-password';