It’s been a while since I’ve installed mysql, and it seems with most recent versions root is set a default password on install which you need to logon and change before you can do anything else.
Logon with:
mysql -u root -p
and enter the temporary password, then change the default with:
ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password';
This is described in the docs here.