The newly installed mysql cannot log in locally. Solution
Change the password after logging in at the console
mysql> alter user 'root'@'localhost' identified with mysql_native_password by '12345678'; Query OK, 0 rows affected (0.01 sec)